Compare commits
64 Commits
ldapcsdk_5
...
MODULAR_NE
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c515100b8e | ||
|
|
fe0f4d855f | ||
|
|
3d4019f9c4 | ||
|
|
9d96048a4b | ||
|
|
ae5d3bac86 | ||
|
|
dd5a8c0dfa | ||
|
|
a5f43d2a13 | ||
|
|
897d60bb73 | ||
|
|
fd1359cac8 | ||
|
|
aa88ba7591 | ||
|
|
0c9f6e6d80 | ||
|
|
f635646933 | ||
|
|
74a41b1364 | ||
|
|
dddf36e52d | ||
|
|
42f1218f94 | ||
|
|
9369584965 | ||
|
|
644d7cd9c7 | ||
|
|
cac7b720c3 | ||
|
|
371d44de72 | ||
|
|
d5840939c7 | ||
|
|
2a50f93567 | ||
|
|
d2a75afae6 | ||
|
|
8f2a603835 | ||
|
|
d9babead55 | ||
|
|
daa26a48be | ||
|
|
be77d90b49 | ||
|
|
e2793376a7 | ||
|
|
6d54e5f6e3 | ||
|
|
b0db9a4acd | ||
|
|
a7a9a03946 | ||
|
|
5340ef2b1b | ||
|
|
1043bb4cc9 | ||
|
|
9cb908ce37 | ||
|
|
93cf7025ed | ||
|
|
42b35681a2 | ||
|
|
bd2471c41c | ||
|
|
3231691800 | ||
|
|
2bdd74e814 | ||
|
|
97b4b7a6d1 | ||
|
|
55369bada1 | ||
|
|
82ed1f72bb | ||
|
|
52d02fe072 | ||
|
|
11e91b2751 | ||
|
|
9c6ac35617 | ||
|
|
50054acba1 | ||
|
|
79a4c9490b | ||
|
|
c181b6d7f9 | ||
|
|
a5e5b98ad8 | ||
|
|
f453d81444 | ||
|
|
05cb725cfb | ||
|
|
46d5611628 | ||
|
|
d9a5e647f5 | ||
|
|
6c07a2ca66 | ||
|
|
3c5574eb6e | ||
|
|
fee6fe5171 | ||
|
|
46e818474a | ||
|
|
ac3fe4623e | ||
|
|
e5430a78e1 | ||
|
|
e8ecd3ec68 | ||
|
|
86e542aa90 | ||
|
|
35f45baaed | ||
|
|
e72757dc16 | ||
|
|
f7ac2222ef | ||
|
|
4099eb2ef3 |
3875
mozilla/cmd/winfe/fegui.cpp
Executable file
3875
mozilla/cmd/winfe/fegui.cpp
Executable file
File diff suppressed because it is too large
Load Diff
2031
mozilla/cmd/winfe/nsapp.cpp
Normal file
2031
mozilla/cmd/winfe/nsapp.cpp
Normal file
File diff suppressed because it is too large
Load Diff
123
mozilla/cmd/winfe/stdafx.h
Normal file
123
mozilla/cmd/winfe/stdafx.h
Normal file
@@ -0,0 +1,123 @@
|
||||
/* -*- 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.
|
||||
*/
|
||||
|
||||
#ifndef STDAFX_PCH
|
||||
#define STDAFX_PCH
|
||||
|
||||
#define OEMRESOURCE
|
||||
|
||||
#if defined(DEBUG_blythe)
|
||||
// Set up a flag specific to WFE developers in the client
|
||||
#define DEBUG_WFE
|
||||
#endif
|
||||
|
||||
/* Very windows specific includes.
|
||||
*/
|
||||
/* MFC, KFC, RUN DMC, whatever */
|
||||
#include <afxwin.h>
|
||||
#include <afxext.h>
|
||||
#include <afxpriv.h>
|
||||
#include <afxole.h>
|
||||
#include <afxdisp.h>
|
||||
#include <afxodlgs.h>
|
||||
#ifdef _WIN32
|
||||
#include <afxcmn.h>
|
||||
#endif
|
||||
|
||||
/* More XP than anything */
|
||||
#include "xp.h"
|
||||
#include "fe_proto.h"
|
||||
#include "fe_rgn.h"
|
||||
#include "libi18n.h"
|
||||
#include "xlate.h"
|
||||
#include "ntypes.h"
|
||||
#ifdef EDITOR
|
||||
#include "edttypes.h"
|
||||
#endif
|
||||
#include "xpassert.h"
|
||||
#include "lo_ele.h"
|
||||
#include "layers.h"
|
||||
|
||||
/* Standard C includes */
|
||||
#ifndef _WIN32
|
||||
#include <dos.h>
|
||||
#endif
|
||||
#include <malloc.h>
|
||||
#include <direct.h>
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
#include <io.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#ifdef DEBUG
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
/* Very windows specific includes.
|
||||
*/
|
||||
/* WFE needs a layout file */
|
||||
extern "C" {
|
||||
#include "layout.h"
|
||||
}
|
||||
|
||||
/* Some common defines. */
|
||||
#ifndef _AFXDLL
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
/* All front end forward declarations needed to compile. */
|
||||
#include "forward.h"
|
||||
|
||||
/* Front end Casting macros. */
|
||||
#include "cast.h"
|
||||
|
||||
/* General purpose utilities. */
|
||||
#include "feutil.h"
|
||||
|
||||
/* afxData/sysInfo */
|
||||
#include "sysinfo.h"
|
||||
|
||||
/* Some defines we like everywhere. */
|
||||
#include "resource.h"
|
||||
#include "defaults.h"
|
||||
|
||||
/* The application include and
|
||||
* Commonly used, rarely changed headers */
|
||||
#include "ncapiurl.h"
|
||||
#include "genedit.h"
|
||||
#include "genframe.h"
|
||||
#include "genview.h"
|
||||
#include "gendoc.h"
|
||||
#include "intlwin.h"
|
||||
#include "mozilla.h"
|
||||
#include "cxwin.h"
|
||||
#include "winproto.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef assert
|
||||
#undef assert
|
||||
#endif
|
||||
#define assert(x) ASSERT(x)
|
||||
#endif
|
||||
|
||||
#endif /* STDAFX_PCH */
|
||||
@@ -1,190 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code, released
|
||||
# March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
LDAP_DEPTH = .
|
||||
NSPR_TREE = ../nsprpub
|
||||
NSS_TREE = ../security
|
||||
MOD_DEPTH = ../nsprpub
|
||||
CORECONFDIR = ../coreconf
|
||||
ALTCORECONFDIR = ../../coreconf
|
||||
DEPTH = ..
|
||||
CONFIGDIR = c-sdk/config
|
||||
MOD_DEPTH = c-sdk
|
||||
|
||||
include $(CONFIGDIR)/config.mk
|
||||
include c-sdk/build.mk
|
||||
|
||||
ifeq ($(COMPONENT_PULL_METHOD), FTP)
|
||||
COMP_PULL_ARG="USE_FTP=YES"
|
||||
endif
|
||||
|
||||
all: FORCE
|
||||
@echo
|
||||
@echo The following are build targets that you can choose from:
|
||||
@echo
|
||||
@echo " gmake buildLdapClientSDK"
|
||||
@echo " gmake clean"
|
||||
@echo
|
||||
@echo Allowed options:
|
||||
@echo
|
||||
@echo " BUILD_OPT=1 for optimized build"
|
||||
@echo " USE_PTHREADS=1 for using pthreads"
|
||||
@echo " USE_64=1 for building 64 bit versions"
|
||||
@echo " BUILD_CLU=1 build command line utilities"
|
||||
@echo " COMPS_FROM_OBJDIR=1 use components from ../dist/$(OBJDIR_NAME)"
|
||||
@echo " VENDOR_NAME=string SDK vendor name (default $(DEFAULT_VENDOR_NAME))"
|
||||
@echo " VENDOR_VERSION=# vendor specific version number * 100 (default $(DEFAULT_VENDOR_VERSION))"
|
||||
@echo
|
||||
@echo Internal options
|
||||
@echo
|
||||
@echo " gmake buildAndPkgLdapSDK"
|
||||
@echo " gmake PullSDKComponents"
|
||||
@echo " gmake pkgLdapSDK"
|
||||
@echo
|
||||
@echo " HAVE_LIBNLS=1 for building/linking with LIBNLS"
|
||||
@echo " HAVE_CCONF=1 for building with components"
|
||||
@echo " HAVE_SVRCORE=1 for building with svrcore"
|
||||
@echo " DONT_REPULL=1 for not repulling components"
|
||||
@echo " PKG_PRIVATE_HDRS=0 do not ship private headers"
|
||||
@echo " PKG_PRIVATE_LIBS=0 do not ship private libraries"
|
||||
@echo " PKG_DEP_LIBS=0 do not ship dependent libraries"
|
||||
ifneq ($(OS_ARCH), WINNT)
|
||||
@echo " COMPONENT_PULL_METHOD=FTP pull components using FTP"
|
||||
endif
|
||||
|
||||
@echo
|
||||
@echo " For internal builds, coreconf must be installed"
|
||||
@echo " in $(CORECONFDIR)"
|
||||
|
||||
buildLdapClientSDK export: PullSDKComponents
|
||||
@echo
|
||||
@echo ==== Starting LDAP Client SDK ==========
|
||||
@echo
|
||||
ifneq ($(HAVE_CCONF), 1)
|
||||
@if [ -d $(NSPR_TREE)/ ]; then \
|
||||
echo "NSPR $(NSPR_VERSION) directory found"; \
|
||||
else \
|
||||
echo "No NSPR $(NSPR_VERSION) directory found"; \
|
||||
fi
|
||||
@if [ -d $(NSS_TREE)/ ]; then \
|
||||
echo "NSS $(NSS_VERSION) directory found"; \
|
||||
else \
|
||||
echo "No NSS $(NSS_VERSION) directory found"; \
|
||||
fi
|
||||
else
|
||||
@if [ -d $(CORECONFDIR)/ ]; then \
|
||||
echo "coreconf $(CORECONFDIR) directory found"; \
|
||||
else \
|
||||
echo "No $(CORECONFDIR) found checking for alternate location"; \
|
||||
if [ -d $(ALTCORECONFDIR)/ ]; then \
|
||||
echo "found $(ALTCORECONFDIR)....copying to $(CORECONFDIR)/"; \
|
||||
cp -r $(ALTCORECONFDIR) $(CORECONFDIR); \
|
||||
else \
|
||||
echo "No coreconf directory found"; \
|
||||
exit 1; \
|
||||
fi \
|
||||
fi
|
||||
@if [ -d $(CORECONFDIR)/ ]; then \
|
||||
cd $(CORECONFDIR); \
|
||||
gmake; \
|
||||
else \
|
||||
echo "No $(CORECONFDIR) directory found"; \
|
||||
fi
|
||||
endif
|
||||
@if [ -d $(CONFIGDIR)/ ]; then \
|
||||
cd $(CONFIGDIR); \
|
||||
gmake; \
|
||||
else \
|
||||
echo "No $(CONFIGDIR) directory found"; \
|
||||
fi
|
||||
@if [ -d $(LDAP_DEPTH)/c-sdk/ldap ]; then \
|
||||
cd $(LDAP_DEPTH)/c-sdk/ldap; \
|
||||
$(MAKE) -f Makefile.client $(MFLAGS) export; \
|
||||
$(MAKE) -f Makefile.client $(MFLAGS) install; \
|
||||
else \
|
||||
echo "No LDAP directory -- skipping"; \
|
||||
exit 0; \
|
||||
fi
|
||||
|
||||
pkgLdapSDK: FORCE
|
||||
@echo
|
||||
@echo ==== Starting LDAP Client SDK packaging ===
|
||||
@echo
|
||||
@if [ -d $(DIST_TREE)/ ]; then \
|
||||
cd $(LDAP_DEPTH)/c-sdk/; \
|
||||
$(MAKE) -f package.mk $(MFLAGS) all; \
|
||||
else \
|
||||
echo "No dist directory found -- can't package"; \
|
||||
exit 0; \
|
||||
fi
|
||||
|
||||
buildAndPkgLdapSDK: buildLdapClientSDK pkgLdapSDK
|
||||
|
||||
PullSDKComponents: FORCE
|
||||
@echo
|
||||
@echo ==== Starting to pull components ==========
|
||||
@echo
|
||||
ifneq ($(DONT_REPULL), 1)
|
||||
ifeq ($(HAVE_CCONF), 1)
|
||||
@if [ -d $(CORECONFDIR)/ ]; then \
|
||||
echo "coreconf $(CORECONFDIR) directory found"; \
|
||||
else \
|
||||
echo "No $(CORECONFDIR) found checking for alternate location"; \
|
||||
if [ -d $(ALTCORECONFDIR)/ ]; then \
|
||||
echo "found $(ALTCORECONFDIR)....copying to $(CORECONFDIR)/"; \
|
||||
cp -r $(ALTCORECONFDIR) $(CORECONFDIR); \
|
||||
else \
|
||||
echo "No coreconf directory found"; \
|
||||
exit 1; \
|
||||
fi \
|
||||
fi
|
||||
@if [ -d $(CORECONFDIR)/ ]; then \
|
||||
cd $(CORECONFDIR); \
|
||||
gmake; \
|
||||
else \
|
||||
echo "No $(CORECONFDIR) directory found"; \
|
||||
fi
|
||||
# cd $(CORECONFDIR)/dbm; \
|
||||
# $(MAKE) VERSION=$(DBM_RELEASE_TAG) $(MFLAGS) $(COMP_PULL_ARG) import
|
||||
cd $(CORECONFDIR)/nspr20; \
|
||||
$(MAKE) VERSION=$(NSPR_RELEASE_TAG) $(MFLAGS) $(COMP_PULL_ARG) import
|
||||
cd $(CORECONFDIR)/security; \
|
||||
$(MAKE) VERSION=$(NSS_RELEASE_TAG) $(MFLAGS) $(COMP_PULL_ARG) import
|
||||
cd $(CORECONFDIR)/svrcore; \
|
||||
$(MAKE) VERSION=$(SVRCORE_RELEASE_TAG) $(MFLAGS) $(COMP_PULL_ARG) import
|
||||
endif
|
||||
endif
|
||||
|
||||
clean clobber: FORCE
|
||||
@if [ -d $(LDAP_DEPTH)/c-sdk/ldap ]; then \
|
||||
cd $(LDAP_DEPTH)/c-sdk/ldap; \
|
||||
$(MAKE) -f Makefile.client $(MFLAGS) clean; \
|
||||
else \
|
||||
echo "No LDAP directory -- skipping"; \
|
||||
exit 0; \
|
||||
fi
|
||||
@if [ -d $(CONFIGDIR) ]; then \
|
||||
cd $(CONFIGDIR); \
|
||||
gmake cleanconfig; \
|
||||
fi
|
||||
|
||||
FORCE:
|
||||
@@ -1,208 +0,0 @@
|
||||
======================================================================
|
||||
NETSCAPE DIRECTORY SDK FOR JAVA:
|
||||
BUILD INSTRUCTIONS
|
||||
Last updated: August 2, 1999
|
||||
======================================================================
|
||||
For information on the Netscape Directory SDK source release,
|
||||
see http://www.mozilla.org/directory/
|
||||
|
||||
Note the following:
|
||||
- The LDAP filter classes (in the netscape.ldap.util package)
|
||||
use the OROMatcher(tm) regular expression package (from ORO Java Software).
|
||||
This is not provided with the source code release. If you want this
|
||||
package, you need to get it from ORO, Inc. (For details, see the
|
||||
ORO, Inc. home page at http://www.oroinc.com/.)
|
||||
|
||||
|
||||
Unix/Linux Build Instructions
|
||||
-----------------------------
|
||||
|
||||
System Requirements:
|
||||
32MB of RAM, 128MB of swap, recommended 64MB of RAM.
|
||||
|
||||
Tool Requirements:
|
||||
Sun Microsystems Java Development Kit (JDK) 1.1.7
|
||||
(or a more recent version)
|
||||
GNU make 3.74 or a more recent version
|
||||
|
||||
Instructions:
|
||||
1. Uncompress and extract the source files by entering the
|
||||
following command (or your preferred variant of this command):
|
||||
|
||||
gzip -dc <filename>.tar.gz | tar -xvf -
|
||||
|
||||
2. Set and unset the following environment variables.
|
||||
|
||||
In csh/tcsh:
|
||||
setenv JAVA_HOME "<directory where the JDK is installed>"
|
||||
For example:
|
||||
setenv JAVA_HOME "/usr/local/jdk1.1.7"
|
||||
setenv CLASSPATH "<location of the JDK classes.zip file>"
|
||||
For example:
|
||||
setenv CLASSPATH "/usr/local/jdk1.1.7/lib/classes.zip"
|
||||
|
||||
In sh/bash/ksh:
|
||||
JAVA_HOME="<directory where the JDK is installed>"
|
||||
CLASSPATH="<location of the JDK classes.zip file>"
|
||||
export JAVA_HOME CLASSPATH
|
||||
|
||||
3. Build the LDAP Java classes by entering the following commands:
|
||||
|
||||
cd mozilla/directory/java-sdk
|
||||
gmake -f ldap.mk
|
||||
|
||||
If you also want the classes packaged in a JAR file,
|
||||
specify "basepackage" as the target:
|
||||
|
||||
gmake -f ldap.mk basepackage
|
||||
|
||||
To generate javadoc specify "doc" as the target:
|
||||
|
||||
gmake -f ldap.mk doc
|
||||
|
||||
Note that if you are using JDK1.1, javadoc images will be missing
|
||||
and you'll need to copy those images from somewhere else into
|
||||
mozilla/directory/java-sdk/dist/doc/images. If you are using JDK1.2
|
||||
you do not need to do that.
|
||||
|
||||
The SDK will be built and copied into the following directories:
|
||||
mozilla/directory/java-sdk/dist/classes - class files and manifest file
|
||||
mozilla/directory/java-sdk/dist/packages - ldapjdk.jar JAR file
|
||||
(if you've specified "basepackage" as the target)
|
||||
mozilla/directory/java-sdk/dist/doc - ldapjdk javadoc
|
||||
(if you've specified "doc" as the target)
|
||||
|
||||
4. Build the JNDI LDAP Service Provider classes by entering the following commands:
|
||||
|
||||
gmake -f ldapsp.mk
|
||||
|
||||
If you also want the classes packaged in a JAR file,
|
||||
specify "basepackage" as the target:
|
||||
|
||||
gmake -f ldapsp.mk basepackage
|
||||
|
||||
To generate javadoc specify "doc" as the target:
|
||||
|
||||
gmake -f ldapsp.mk doc
|
||||
|
||||
The SDK will be built and copied into the following directories:
|
||||
mozilla/directory/java-sdk/dist/classes - class files
|
||||
mozilla/directory/java-sdk/dist/packages - ldapsp.jar JAR file
|
||||
(if you've specified "basepackage" as the target)
|
||||
mozilla/directory/java-sdk/dist/doc/ldapsp - ldapsp controls' javadoc
|
||||
(if you've specified "doc" as the target)
|
||||
|
||||
The JNDI LDAP Service Provider depends on the LDAP Java classes, so you
|
||||
always must build the LDAP Java first. For more information on JNDI see
|
||||
ldapsp/Readme.html and http://java.sun.com/products/jndi/index.html
|
||||
|
||||
|
||||
Windows Build Instructions
|
||||
--------------------------
|
||||
|
||||
System Requirements:
|
||||
Windows NT 3.51 or 4.0 (4.0 preferred).
|
||||
|
||||
Tool Requirements:
|
||||
Sun Microsystems Java Development Kit (JDK) 1.1.7
|
||||
(or a more recent version)
|
||||
GNU Tools for Windows (you can find these on the Internet).
|
||||
Specifically, you'll need:
|
||||
cp.exe
|
||||
rm.exe
|
||||
Here are some sample download sites to find these:
|
||||
Cygnus (http://www.cygnus.com/misc/gnu-win32)
|
||||
GNU (http://www.gnu.org/order/ftp.html)
|
||||
MIT (ftp://prep.ai.mit.edu/pub/gnu)
|
||||
Netscape uses internally modified versions of the following tools:
|
||||
gmake.exe
|
||||
shmsdos.exe
|
||||
uname.exe
|
||||
You can download them from http://www.mozilla.org/download-mozilla.html
|
||||
(click the Windows Build Tools link). When you unzip the file, the
|
||||
tools will be located in the windows\bin\x86 directory.
|
||||
|
||||
All of these tools need to be put in your path.
|
||||
|
||||
Extracting the Source Files:
|
||||
The source files for the Directory SDK are zipped in a file.
|
||||
When unzipping the file, make sure to specify that you want to
|
||||
preserve the directory structure. For example,
|
||||
make sure that "Use Folder Names" is checked.
|
||||
|
||||
Instructions:
|
||||
NOTE: Make sure to run the commands from a standard Windows NT
|
||||
command prompt. Although you may be able to use other shells
|
||||
to build the SDK, you may need to adjust the makefiles for
|
||||
the shell that you are using.
|
||||
1. Set the following environment variables (within the command session,
|
||||
either manually or via a script), or within the system environment
|
||||
through the Control Panel | System control panel):
|
||||
|
||||
set MOZ_SRC=(top of your source tree, drive letter and path.
|
||||
For example, set MOZ_SRC=d:\mozilla_src, if the mozilla
|
||||
directory is at d:\mozilla_src\mozilla.)
|
||||
set JAVA_HOME=(directory where the JDK is installed)
|
||||
For example:
|
||||
set JAVA_HOME=D:\jdk1.1.7
|
||||
set CLASSPATH=(location of the JDK classes.zip file)
|
||||
For example:
|
||||
set CLASSPATH=D:\jdk1.1.7\lib\classes.zip
|
||||
|
||||
In addition, make sure to set your PATH environment variable to
|
||||
include the tools that you have downloaded.
|
||||
|
||||
2. Enter the following commands to build the LDAP Java classes:
|
||||
cd mozilla\directory\java-sdk
|
||||
gmake -f ldap.mk
|
||||
|
||||
If you also want the classes packaged in a JAR file,
|
||||
specify "basepackage" as the target:
|
||||
|
||||
gmake -f ldap.mk basepackage
|
||||
|
||||
To generate javadoc specify "doc" as the target:
|
||||
|
||||
gmake -f ldap.mk doc
|
||||
|
||||
Note that if you are using JDK1.1, javadoc images will be missing
|
||||
and you'll need to copy those images from somewhere else into
|
||||
mozilla\directory\java-sdk\dist\doc\images. If you are using JDK1.2
|
||||
you do not need to do that.
|
||||
|
||||
The SDK will be built and copied into the following directories:
|
||||
mozilla\directory\java-sdk\dist\classes - class files and manifest file
|
||||
mozilla\directory\java-sdk\dist\packages - ldapjdk.jar JAR file
|
||||
(if you've specified "basepackage" as the target)
|
||||
mozilla\directory\java-sdk\dist\doc - ldapjdk javadoc
|
||||
(if you've specified "doc" as the target)
|
||||
|
||||
|
||||
3. Build the JNDI LDAP Service Provider classes by entering the following commands:
|
||||
|
||||
gmake -f ldapsp.mk
|
||||
|
||||
If you also want the classes packaged in a JAR file,
|
||||
specify "basepackage" as the target:
|
||||
|
||||
gmake -f ldapsp.mk basepackage
|
||||
|
||||
To generate javadoc specify "doc" as the target:
|
||||
|
||||
gmake -f ldapsp.mk doc
|
||||
|
||||
The SDK will be built and copied into the following directories:
|
||||
mozilla/directory/java-sdk/dist/classes - class files
|
||||
mozilla/directory/java-sdk/dist/packages - ldapsp.jar JAR file
|
||||
(if you've specified "basepackage" as the target)
|
||||
mozilla\directory\java-sdk\dist\doc\ldapsp - ldapsp controls' javadoc
|
||||
(if you've specified "doc" as the target)
|
||||
|
||||
The JNDI LDAP Service Provider depends on the LDAP Java classes, so you
|
||||
always must build the LDAP Java first. For more information on JNDI see
|
||||
ldapsp/Readme.html and http://java.sun.com/products/jndi/index.html
|
||||
|
||||
--------------------------------------------------------
|
||||
Copyright (c) 1999 Netscape Communications Corporation.
|
||||
(http://home.netscape.com/misc/contact_info.html)
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
MOD_DEPTH = .
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
include $(MOD_DEPTH)/config/autoconf.mk
|
||||
|
||||
DIRS = config ldap
|
||||
|
||||
DIST_GARBAGE = config.cache config.log config.status
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
# dummy target to allow platforms without a compiler-based depend (like GCC
|
||||
# has) to call "make depend" here and not fail, at the cost of actual
|
||||
# dependencies on such builds possibly being incorrect. A nasty hack, but
|
||||
# this build system is going away soon.
|
||||
#
|
||||
depend:
|
||||
|
||||
FORCE:
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
The autoconf files here are a minimal shim to allow the LDAP C SDK to
|
||||
build with autoconf. These are currently just a slightly modified
|
||||
version of the existing Makefile.client-based build system, merged
|
||||
with a copy of the NSPR autoconf stuff. As in the main browser tree,
|
||||
I've checked in the (generated) configure script so that autoconf
|
||||
isn't a prerequisite to build.
|
||||
|
||||
My hope is that the owners of the C SDK will be interested in
|
||||
migrating to this build system, so that over time it can evolve into a
|
||||
true autoconf-style build system with all the goodies that go with
|
||||
that (ie configure-time feature tests for faster porting to new
|
||||
platforms, cross-compilation support, etc.).
|
||||
|
||||
Comments to <news://news.mozilla.org/netscape.public.mozilla.directory>,
|
||||
please.
|
||||
|
||||
Dan Mosedale
|
||||
<dmose@netscape.com>
|
||||
39
mozilla/directory/c-sdk/aclocal.m4
vendored
39
mozilla/directory/c-sdk/aclocal.m4
vendored
@@ -1,39 +0,0 @@
|
||||
dnl
|
||||
dnl ***** BEGIN LICENSE BLOCK *****
|
||||
dnl Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
dnl
|
||||
dnl The contents of this file are subject to the Mozilla Public License Version
|
||||
dnl 1.1 (the "License"); you may not use this file except in compliance with
|
||||
dnl the License. You may obtain a copy of the License at
|
||||
dnl http://www.mozilla.org/MPL/
|
||||
dnl
|
||||
dnl Software distributed under the License is distributed on an "AS IS" basis,
|
||||
dnl WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
dnl for the specific language governing rights and limitations under the
|
||||
dnl License.
|
||||
dnl
|
||||
dnl The Original Code is mozilla.org code.
|
||||
dnl
|
||||
dnl The Initial Developer of the Original Code is
|
||||
dnl Netscape Communications Corporation.
|
||||
dnl Portions created by the Initial Developer are Copyright (C) 2002
|
||||
dnl the Initial Developer. All Rights Reserved.
|
||||
dnl
|
||||
dnl Contributor(s):
|
||||
dnl Dan Mosedale <dmose@netcape.com>
|
||||
dnl
|
||||
dnl Alternatively, the contents of this file may be used under the terms of
|
||||
dnl either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
dnl the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
dnl in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
dnl of those above. If you wish to allow use of your version of this file only
|
||||
dnl under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
dnl use your version of this file under the terms of the MPL, indicate your
|
||||
dnl decision by deleting the provisions above and replace them with the notice
|
||||
dnl and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
dnl the provisions above, a recipient may use your version of this file under
|
||||
dnl the terms of any one of the MPL, the GPL or the LGPL.
|
||||
dnl
|
||||
dnl ***** END LICENSE BLOCK *****
|
||||
|
||||
builtin(include, config/autoconf/nspr.m4)dnl
|
||||
@@ -1,510 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code, released
|
||||
# March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
# some vendors may wish to override COMPVERSIONDIR from the command-line
|
||||
#
|
||||
ifdef USE_AUTOCONF
|
||||
COMPVERSIONDIR = $(topsrcdir)
|
||||
else
|
||||
COMPVERSIONDIR = $(DEPTH)/directory/c-sdk
|
||||
endif
|
||||
|
||||
DEFAULT_VENDOR_NAME=mozilla.org
|
||||
DEFAULT_VENDOR_VERSION=500
|
||||
|
||||
ifndef VENDOR_NAME
|
||||
VENDOR_NAME = $(DEFAULT_VENDOR_NAME)
|
||||
endif
|
||||
|
||||
ifndef VENDOR_VERSION
|
||||
VENDOR_VERSION = $(DEFAULT_VENDOR_VERSION)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
COMPONENT_PULL_METHOD=FTP
|
||||
win_srcdir:=$(subst $(topsrcdir),$(WIN_TOP_SRC),$(srcdir))
|
||||
endif
|
||||
|
||||
# component tags for internal build only
|
||||
include $(COMPVERSIONDIR)/component_versions.mk
|
||||
|
||||
# Ldap library
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
LDAP_LIBNAME = nsldap32v$(LDAPVERS)
|
||||
else
|
||||
LDAP_LIBNAME = ldap$(LDAPVERS)
|
||||
endif
|
||||
DIR_VERSION = $(LDAPVERS_SUFFIX)
|
||||
DIRSDK_VERSION = $(LDAPVERS_SUFFIX)
|
||||
|
||||
# PrLdap library
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
PRLDAP_LIBNAME = nsldappr32v$(PRLDAPVERS)
|
||||
else
|
||||
PRLDAP_LIBNAME = prldap$(PRLDAPVERS)
|
||||
endif
|
||||
|
||||
# lber library
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
LBER_LIBNAME = nslber32v$(LBERVERS)
|
||||
else
|
||||
LBER_LIBNAME = lber$(LBERVERS)
|
||||
endif
|
||||
|
||||
# ldif library
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
LDIF_LIBNAME = nsldif32v$(LDIFVERS)
|
||||
else
|
||||
LDIF_LIBNAME = ldif$(LDIFVERS)
|
||||
endif
|
||||
|
||||
# iutil library
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
IUTIL_LIBNAME = nsiutil32v$(IUTILVERS)
|
||||
else
|
||||
IUTIL_LIBNAME = iutil$(IUTILVERS)
|
||||
endif
|
||||
|
||||
# util library
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
UTIL_LIBNAME = nsutil32v$(UTILVERS)
|
||||
else
|
||||
UTIL_LIBNAME = util$(UTILVERS)
|
||||
endif
|
||||
|
||||
# ssl library
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
SSLDAP_LIBNAME = nsldapssl32v$(SSLDAPVERS)
|
||||
else
|
||||
SSLDAP_LIBNAME = ssldap$(SSLDAPVERS)
|
||||
endif
|
||||
|
||||
# nss library
|
||||
NSS_LIBNAME = nss$(NSSVERS)
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
SOFTOKN_LIBNAME = softokn$(NSSVERS)
|
||||
endif
|
||||
SSL_LIBNAME = ssl$(NSSVERS)
|
||||
HYBRID_LIBNAME = freebl_hybrid_$(NSSVERS)
|
||||
PURE32_LIBNAME = freebl_pure32_$(NSSVERS)
|
||||
|
||||
ifneq ($(USE_64), 1)
|
||||
ifeq ($(OS_ARCH), SunOS)
|
||||
ifneq ($(OS_TEST),i86pc)
|
||||
COPYFREEBL = 1
|
||||
endif
|
||||
endif
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
COPYFREEBL = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
# svrcore library
|
||||
SVRCOREVERS =
|
||||
SVRCOREVERS_SUFFIX =
|
||||
SVRCORE_LIBNAME = svrcore$(SVRCOREVERS)
|
||||
|
||||
#
|
||||
# NSPR library
|
||||
#
|
||||
|
||||
ifeq ($(OS_TARGET), WIN95)
|
||||
PLC_BASENAME=plc$(NSPR_LIBVERSION)
|
||||
PLDS_BASENAME=plds$(NSPR_LIBVERSION)
|
||||
NSPR_BASENAME=nspr$(NSPR_LIBVERSION)
|
||||
else
|
||||
PLC_BASENAME=libplc$(NSPR_LIBVERSION)
|
||||
PLDS_BASENAME=libplds$(NSPR_LIBVERSION)
|
||||
NSPR_BASENAME=libnspr$(NSPR_LIBVERSION)
|
||||
endif
|
||||
|
||||
PLCBASE=plc$(NSPR_LIBVERSION)
|
||||
PLDSBASE=plds$(NSPR_LIBVERSION)
|
||||
NSPRBASE=nspr$(NSPR_LIBVERSION)
|
||||
|
||||
DYNAMICNSPR = -l$(PLCBASE) -l$(PLDSBASE) -l$(NSPRBASE)
|
||||
|
||||
PLC_LIBNAME=plc$(NSPR_LIBVERSION)
|
||||
PLDS_LIBNAME=plds$(NSPR_LIBVERSION)
|
||||
NSPR_LIBNAME=nspr$(NSPR_LIBVERSION)
|
||||
|
||||
#
|
||||
# NLS library
|
||||
#
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
NSCNV_LIBNAME =nscnv32$(NLS_LIBVERSION).$(LIB_SUFFIX)
|
||||
NSJPN_LIBNAME =nsjpn32$(NLS_LIBVERSION).$(LIB_SUFFIX)
|
||||
NSCCK_LIBNAME =nscck32$(NLS_LIBVERSION).$(LIB_SUFFIX)
|
||||
NSSB_LIBNAME =nssb32$(NLS_LIBVERSION).$(LIB_SUFFIX)
|
||||
else
|
||||
NSCNV_LIBNAME =libnscnv$(NLS_LIBVERSION).$(LIB_SUFFIX)
|
||||
NSJPN_LIBNAME =libnsjpn$(NLS_LIBVERSION).$(LIB_SUFFIX)
|
||||
NSCCK_LIBNAME =libnscck$(NLS_LIBVERSION).$(LIB_SUFFIX)
|
||||
NSSB_LIBNAME =libnssb$(NLS_LIBVERSION).$(LIB_SUFFIX)
|
||||
endif
|
||||
|
||||
ifdef RELEASE_TREE
|
||||
LIBNLS_INCLUDES_LOC = $(RELEASE_TREE)/libnls$(NLS_LIBVERSION)/$(LIBNLS_RELDATE)/$(OBJDIR_NAME)/include
|
||||
LIBNLS_LIB_LOC = $(RELEASE_TREE)/libnls$(NLS_LIBVERSION)/$(LIBNLS_RELDATE)/$(OBJDIR_NAME)/lib
|
||||
else
|
||||
LIBNLS_INCLUDES_LOC = /share/builds/components/libnls$(NLS_LIBVERSION)/$(LIBNLS_RELDATE)/$(OBJDIR_NAME)/include
|
||||
LIBNLS_LIB_LOC = /share/builds/components/libnls$(NLS_LIBVERSION)/$(LIBNLS_RELDATE)/$(OBJDIR_NAME)/lib
|
||||
|
||||
endif
|
||||
LIBNLS_DIR = ../../../../../dist/libnls$(NLS_LIBVERSION)
|
||||
ifeq ($(COMPONENT_PULL_METHOD), FTP)
|
||||
LIBNLS_INCLUDES =../../../../../dist/libnls$(NLS_LIBVERSION)/$(OBJDIR_NAME)/include
|
||||
LIBNLS_LIBDIR =../../../../../dist/libnls$(NLS_LIBVERSION)/$(OBJDIR_NAME)/lib
|
||||
else
|
||||
LIBNLS_INCLUDES =../../../../../dist/public/libnls
|
||||
LIBNLS_LIBDIR =../../../../../dist/$(OBJDIR_NAME)/libnls
|
||||
endif
|
||||
|
||||
RM = rm -f
|
||||
SED = sed
|
||||
|
||||
# uncomment to enable support for LDAP referrals
|
||||
LDAP_REFERRALS = -DLDAP_REFERRALS
|
||||
DEFNETSSL = -DNET_SSL
|
||||
NOLIBLCACHE = -DNO_LIBLCACHE
|
||||
NSDOMESTIC = -DNS_DOMESTIC
|
||||
|
||||
|
||||
ifdef BUILD_OPT
|
||||
LDAP_DEBUG =
|
||||
else
|
||||
LDAP_DEBUG = -DLDAP_DEBUG
|
||||
endif
|
||||
|
||||
ifdef HAVE_LIBNLS
|
||||
HAVELIBNLS = -DHAVE_LIBNLS
|
||||
else
|
||||
HAVELIBNLS =
|
||||
endif
|
||||
|
||||
ifdef BUILD_CLU
|
||||
BUILDCLU = 1
|
||||
else
|
||||
BUILDCLU =
|
||||
endif
|
||||
|
||||
#
|
||||
# DEFS are included in CFLAGS
|
||||
#
|
||||
DEFS = $(PLATFORMCFLAGS) $(LDAP_DEBUG) $(HAVELIBNLS) \
|
||||
$(CLDAP) $(DEFNETSSL) $(NOLIBLCACHE) \
|
||||
$(LDAP_REFERRALS) $(LDAP_DNS) $(STR_TRANSLATION) \
|
||||
$(LIBLDAP_CHARSETS) $(LIBLDAP_DEF_CHARSET) \
|
||||
$(NSDOMESTIC) $(LDAPSSLIO)
|
||||
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
DIRVER_PROG=$(COMMON_OBJDIR)/dirver.exe
|
||||
else
|
||||
DIRVER_PROG=$(COMMON_OBJDIR)/dirver
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
EXE_SUFFIX=.exe
|
||||
RSC=rc
|
||||
ifdef NS_USE_GCC
|
||||
OFFLAG=-o #
|
||||
else
|
||||
OFFLAG=/Fo
|
||||
endif
|
||||
else
|
||||
OFFLAG=-o
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), Linux)
|
||||
DEFS += -DLINUX2_0 -DLINUX1_2 -DLINUX2_1
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
ifndef NS_USE_GCC
|
||||
DLLEXPORTS_PREFIX=-DEF:
|
||||
USE_DLL_EXPORTS_FILE = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), OS2)
|
||||
USE_DLL_EXPORTS_FILE = 1
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), SunOS)
|
||||
DLLEXPORTS_PREFIX=-Blocal -M
|
||||
USE_DLL_EXPORTS_FILE = 1
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), IRIX)
|
||||
DLLEXPORTS_PREFIX=-exports_file
|
||||
USE_DLL_EXPORTS_FILE = 1
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
DEFS += -Dhpux -D_REENTRANT
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),AIX)
|
||||
DLLEXPORTS_PREFIX=-bE:
|
||||
DL=-ldl
|
||||
USE_DLL_EXPORTS_FILE = 1
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),OSF1)
|
||||
DEFS += -DOSF1V4
|
||||
DL=
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),ReliantUNIX)
|
||||
DL=-ldl
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),UnixWare)
|
||||
DL=
|
||||
endif
|
||||
|
||||
RPATHFLAG = ..:../lib:../../lib:../../../lib:../../../../lib
|
||||
|
||||
ifeq ($(OS_ARCH), SunOS)
|
||||
# include $ORIGIN in run time library path (work on Solaris 8 10/01 and later
|
||||
RPATHFLAG := \$$ORIGIN/../lib:\$$ORIGIN/../../lib:$(RPATHFLAG)
|
||||
|
||||
# flag to pass to cc when linking to set runtime shared library search path
|
||||
# this is used like this, for example: $(RPATHFLAG_PREFIX)../..
|
||||
RPATHFLAG_PREFIX=-Wl,-R,
|
||||
|
||||
# flag to pass to ld when linking to set runtime shared library search path
|
||||
# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
|
||||
LDRPATHFLAG_PREFIX=-R
|
||||
|
||||
# OS network libraries
|
||||
PLATFORMLIBS+=-lresolv -lsocket -lnsl -lgen -ldl -lposix4
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), OSF1)
|
||||
# flag to pass to cc when linking to set runtime shared library search path
|
||||
# this is used like this, for example: $(RPATHFLAG_PREFIX)../..
|
||||
RPATHFLAG_PREFIX=-Wl,-rpath,
|
||||
|
||||
# flag to pass to ld when linking to set runtime shared library search path
|
||||
# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
|
||||
LDRPATHFLAG_PREFIX=-rpath
|
||||
|
||||
# allow for unresolved symbols
|
||||
DLL_LDFLAGS += -expect_unresolved "*"
|
||||
endif # OSF1
|
||||
|
||||
ifeq ($(OS_ARCH), AIX)
|
||||
# Flags to set runtime shared library search path. For example:
|
||||
# $(CC) $(RPATHFLAG_PREFIX)../..$(RPATHFLAG_EXTRAS)
|
||||
RPATHFLAG_PREFIX=-blibpath:
|
||||
RPATHFLAG_EXTRAS=:/usr/lib:/lib
|
||||
|
||||
# flag to pass to ld when linking to set runtime shared library search path
|
||||
# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
|
||||
LDRPATHFLAG_PREFIX=-blibpath:/usr/lib:/lib:
|
||||
DLL_LDFLAGS= -bM:SRE -bnoentry \
|
||||
-L.:/usr/lib/threads:/usr/lpp/xlC/lib:/usr/lib:/lib
|
||||
DLL_EXTRA_LIBS= -bI:/usr/lib/lowsys.exp -lC_r -lC -lpthreads -lc_r -lm \
|
||||
/usr/lib/libc.a
|
||||
|
||||
EXE_EXTRA_LIBS= -bI:/usr/lib/syscalls.exp -lsvld -lpthreads
|
||||
endif # AIX
|
||||
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
# flag to pass to cc when linking to set runtime shared library search path
|
||||
# this is used like this, for example: $(RPATHFLAG_PREFIX)../..
|
||||
RPATHFLAG_PREFIX=-Wl,+s,+b,
|
||||
|
||||
# flag to pass to ld when linking to set runtime shared library search path
|
||||
# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
|
||||
LDRPATHFLAG_PREFIX=+s +b
|
||||
|
||||
# we need to link in the rt library to get sem_*()
|
||||
PLATFORMLIBS += -lrt
|
||||
PLATFORMCFLAGS=
|
||||
|
||||
endif # HP-UX
|
||||
|
||||
ifeq ($(OS_ARCH), Linux)
|
||||
# flag to pass to cc when linking to set runtime shared library search path
|
||||
# this is used like this, for example: $(RPATHFLAG_PREFIX)../..
|
||||
RPATHFLAG_PREFIX=-Wl,-rpath,
|
||||
|
||||
# flag to pass to ld when linking to set runtime shared library search path
|
||||
# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
|
||||
# note, there is a trailing space
|
||||
LDRPATHFLAG_PREFIX=-rpath
|
||||
endif # Linux
|
||||
|
||||
#
|
||||
# XXX: does anyone know of a better way to solve the "LINK_LIB2" problem? -mcs
|
||||
#
|
||||
# Link to produce a console/windows exe on Windows
|
||||
#
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
|
||||
ifdef NS_USE_GCC
|
||||
LINK_EXE = $(CC) -o $@ $(LDFLAGS) $(LCFLAGS) $(DEPLIBS) $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
|
||||
LINK_LIB = $(AR) cr $@ $(OBJS)
|
||||
LINK_DLL = $(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(@:.$(DLL_SUFFIX)=.$(LIB_SUFFIX)) $(LLFLAGS) $(DLL_LDFLAGS) -o $@ $(OBJS) $(EXTRA_LIBS) $(EXTRA_DLL_LIBS)
|
||||
else
|
||||
DEBUG_LINK_OPT=-DEBUG
|
||||
ifeq ($(BUILD_OPT), 1)
|
||||
ifndef MOZ_DEBUG_SYMBOLS
|
||||
DEBUG_LINK_OPT=
|
||||
endif
|
||||
DEBUG_LINK_OPT += -OPT:REF
|
||||
endif
|
||||
|
||||
SUBSYSTEM=CONSOLE
|
||||
ifndef MOZ_DEBUG_SYMBOLS
|
||||
DEBUG_FLAGS=-PDB:NONE
|
||||
endif
|
||||
|
||||
LINK_EXE = $(CYGWIN_WRAPPER) link $(DEBUG_LINK_OPT) -OUT:"$@" -MAP $(ALDFLAGS) $(LDFLAGS) $(ML_DEBUG) \
|
||||
$(LCFLAGS) -NOLOGO $(DEBUG_FLAGS) -INCREMENTAL:NO \
|
||||
-NODEFAULTLIB:MSVCRTD -SUBSYSTEM:$(SUBSYSTEM) $(DEPLIBS) \
|
||||
$(EXTRA_LIBS) $(PLATFORMLIBS) $(OBJS)
|
||||
LINK_LIB = $(CYGWIN_WRAPPER) lib -OUT:"$@" $(OBJS)
|
||||
LINK_DLL = $(CYGWIN_WRAPPER) link $(DEBUG_LINK_OPT) -nologo -MAP -DLL $(DEBUG_FLAGS) \
|
||||
$(ML_DEBUG) -SUBSYSTEM:$(SUBSYSTEM) $(LLFLAGS) $(DLL_LDFLAGS) \
|
||||
$(EXTRA_LIBS) -out:"$@" $(OBJS)
|
||||
endif # NS_USE_GCC
|
||||
else # WINNT
|
||||
#
|
||||
# UNIX link commands
|
||||
#
|
||||
ifeq ($(OS_ARCH),OS2)
|
||||
LINK_LIB = -$(RM) $@ && $(AR) $(AR_FLAGS) $(OBJS) && $(RANLIB) $@
|
||||
LINK_LIB2 = -$(RM) $@ && $(AR) $@ $(OBJS2) && $(RANLIB) $@
|
||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||
LINK_DLL = $(LD) $(OS_DLLFLAGS) $(DLLFLAGS) $(OBJS)
|
||||
else
|
||||
LINK_DLL = $(LD) $(DSO_LDOPTS) $(ALDFLAGS) $(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \
|
||||
-o $@ $(OBJS)
|
||||
endif
|
||||
|
||||
else
|
||||
|
||||
LINK_LIB = $(RM) $@; $(AR) $(AR_FLAGS) $(OBJS); $(RANLIB) $@
|
||||
LINK_LIB2 = $(RM) $@; $(AR) $@ $(OBJS2); $(RANLIB) $@
|
||||
ifdef SONAMEFLAG_PREFIX
|
||||
LINK_DLL = $(LD) $(DSO_LDOPTS) $(ALDFLAGS) $(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \
|
||||
-o $@ $(SONAMEFLAG_PREFIX)$(notdir $@) $(OBJS)
|
||||
else # SONAMEFLAG_PREFIX
|
||||
LINK_DLL = $(LD) $(DSO_LDOPTS) $(ALDFLAGS) $(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \
|
||||
-o $@ $(OBJS)
|
||||
endif # SONAMEFLAG_PREFIX
|
||||
endif #!os2
|
||||
|
||||
ifeq ($(OS_ARCH), OSF1)
|
||||
# The linker on OSF/1 gets confused if it finds an so_locations file
|
||||
# that doesn't meet its expectations, so we arrange to remove it before
|
||||
# linking.
|
||||
SO_FILES_TO_REMOVE=so_locations
|
||||
endif
|
||||
|
||||
ifneq (,$(filter BeOS Darwin NetBSD,$(OS_ARCH)))
|
||||
LINK_DLL = $(MKSHLIB) $(OBJS)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
# On HPUX, we need a couple of changes:
|
||||
# 1) Use the C++ compiler for linking, which will pass the +eh flag on down to the
|
||||
# linker so the correct exception-handling-aware libC gets used (libnshttpd.sl
|
||||
# needs this).
|
||||
# 2) Add a "-Wl,-E" option so the linker gets a "-E" flag. This makes symbols
|
||||
# in an executable visible to shared libraries loaded at runtime.
|
||||
LINK_EXE = $(CCC) -Wl,-E $(ALDFLAGS) $(LDFLAGS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) -o $@ $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
|
||||
|
||||
ifeq ($(USE_64), 1)
|
||||
LINK_EXE = $(CCC) -DHPUX_ACC -D__STDC_EXT__ -D_POSIX_C_SOURCE=199506L +DA2.0W +DS2.0 -Wl,-E $(ALDFLAGS) $(LDFLAGS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) -o $@ $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
|
||||
endif
|
||||
|
||||
else # HP-UX
|
||||
# everything except HPUX
|
||||
ifeq ($(OS_ARCH), ReliantUNIX)
|
||||
# Use the C++ compiler for linking if at least ONE object is C++
|
||||
export LD_RUN_PATH=$(RPATHFLAG)
|
||||
LINK_EXE = $(CXX) $(ALDFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
|
||||
|
||||
else # ReliantUNIX
|
||||
ifdef USE_LD_RUN_PATH
|
||||
#does RPATH differently. instead we export RPATHFLAG as LD_RUN_PATH
|
||||
#see ns/netsite/ldap/clients/tools/Makefile for an example
|
||||
export LD_RUN_PATH=$(RPATHFLAG)
|
||||
LINK_EXE = $(CC) $(ALDFLAGS) $(LDFLAGS) \
|
||||
-o $@ $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
|
||||
LINK_EXE_NOLIBSOBJS = $(CC) $(ALDFLAGS) $(LDFLAGS) -o $@
|
||||
else # USE_LD_RUN_PATH
|
||||
LINK_EXE = $(CC) $(ALDFLAGS) $(LDFLAGS) \
|
||||
$(RPATHFLAG_PREFIX)$(RPATHFLAG)$(RPATHFLAG_EXTRAS) \
|
||||
-o $@ $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
|
||||
LINK_EXE_NOLIBSOBJS = $(CC) $(ALDFLAGS) $(LDFLAGS) \
|
||||
$(RPATHFLAG_PREFIX)$(RPATHFLAG)$(RPATHFLAG_EXTRAS) -o $@
|
||||
endif # USE_LD_RUN_PATH
|
||||
endif # ReliantUNIX
|
||||
endif # HP-UX
|
||||
endif # WINNT
|
||||
|
||||
ifeq ($(OS_ARCH), OSF1)
|
||||
LINK_EXE = $(CCC) $(ALDFLAGS) $(LDFLAGS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) \
|
||||
-o $@ $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), SunOS)
|
||||
ifeq ($(USE_64), 1)
|
||||
LINK_EXE = $(CCC) $(ALDFLAGS) $(LDFLAGS) -R:$(RPATHFLAG)\
|
||||
-o $@ $(OBJS) $(EXTRA_LIBS) $(PLATFORMLIBS)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
PERL ?= perl
|
||||
#
|
||||
# shared library symbol export definitions
|
||||
#
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
GENEXPORTS=cmd /c $(PERL) $(LDAP_SRC)/build/genexports.pl
|
||||
else
|
||||
GENEXPORTS=$(PERL) $(LDAP_SRC)/build/genexports.pl
|
||||
endif
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code, released
|
||||
# March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
# NSPR - Netscape Portable Runtime
|
||||
NSPR_LIBVERSION = 4
|
||||
NSPR_RELEASE_TAG = v4.1.2
|
||||
|
||||
# NSS - Network Security Services
|
||||
NSSVERS = 3
|
||||
NSS_RELEASE_TAG = NSS_3_3_2_RTM
|
||||
#NSS_DYNAMIC_SOFTOKN = 1
|
||||
|
||||
# SVRCORE - Client/server utility library
|
||||
SVRCORE_RELEASE_TAG = SVRCORE_3_3_RTM
|
||||
|
||||
# LDAP library
|
||||
LDAPVERS = 50
|
||||
LDAPVERS_SUFFIX = 5.0
|
||||
|
||||
# PRLDAP library
|
||||
PRLDAPVERS = 50
|
||||
PRLDAPVERS_SUFFIX = 5.0
|
||||
|
||||
# LBER library
|
||||
LBERVERS = 50
|
||||
LBERVERS_SUFFIX = 5.0
|
||||
|
||||
# ldif library
|
||||
LDIFVERS = 50
|
||||
LDIFVERS_SUFFIX = 5.0
|
||||
|
||||
# iutil library
|
||||
IUTILVERS = 50
|
||||
IUTILVERS_SUFFIX = 5.0
|
||||
|
||||
# util library
|
||||
UTILVERS = 50
|
||||
UTILVERS_SUFFIX = 5.0
|
||||
|
||||
# ssl library
|
||||
SSLDAPVERS = 50
|
||||
SSLDAPVERS_SUFFIX = 5.0
|
||||
|
||||
|
||||
# libNLS - National Language Support.
|
||||
NLS_LIBVERSION = 31
|
||||
LIBNLS_RELDATE = v3.2
|
||||
|
||||
# Some components already had existing Solaris 5.8 symbolic
|
||||
# link to a Solaris 5.6 version. Hence, the new respun components
|
||||
# were put in in a forte6 directory in each of the component
|
||||
# respectively. For Solaris 5.8 only we have to pick up the components
|
||||
# from the forte6 directory. As we move forward with new components,
|
||||
# we can take the mess below out
|
||||
# Michael.....
|
||||
ifeq ($(OS_ARCH), SunOS)
|
||||
ifneq ($(USE_64), 1)
|
||||
OS_VERS := $(shell uname -r)
|
||||
ifeq ($(OS_VERS),5.8)
|
||||
ifneq ($(OS_TEST),i86pc)
|
||||
NSPR_RELEASE_TAG=v4.1.2/forte6
|
||||
NSS_RELEASE_TAG =NSS_3_3_1_RTM/forte6
|
||||
SVRCORE_RELEASE_TAG=SVRCORE_3_3_RTM/forte6
|
||||
LIBNLS_RELDATE=v3.2/forte6
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -1,179 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for AIX.
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
#
|
||||
# XXX
|
||||
# Temporary define for the Client; to be removed when binary release is used
|
||||
#
|
||||
ifdef MOZILLA_CLIENT
|
||||
ifneq ($(USE_PTHREADS),1)
|
||||
CLASSIC_NSPR = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# There are three implementation strategies available on AIX:
|
||||
# pthreads, classic, and pthreads-user.
|
||||
#
|
||||
# On AIX 3.2, classic nspr is the default (and only) implementation
|
||||
# strategy. On AIX 4.1 and later, the default is pthreads.
|
||||
#
|
||||
ifeq ($(OS_RELEASE),3.2)
|
||||
CLASSIC_NSPR = 1
|
||||
endif
|
||||
|
||||
ifeq ($(CLASSIC_NSPR),1)
|
||||
PTHREADS_USER =
|
||||
USE_PTHREADS =
|
||||
IMPL_STRATEGY = _EMU
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
else
|
||||
ifeq ($(PTHREADS_USER),1)
|
||||
USE_PTHREADS =
|
||||
IMPL_STRATEGY = _PTH_USER
|
||||
else
|
||||
USE_PTHREADS = 1
|
||||
ifeq ($(HAVE_CCONF), 1)
|
||||
IMPL_STRATEGY =
|
||||
else
|
||||
IMPL_STRATEGY = _PTH
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# IPv6 support part of the standard AIX 4.3 release.
|
||||
ifneq (,$(filter-out 3.2 4.1 4.2,$(OS_RELEASE)))
|
||||
USE_IPV6 = 1
|
||||
endif
|
||||
|
||||
ifeq ($(CLASSIC_NSPR),1)
|
||||
CC = xlC
|
||||
CCC = xlC
|
||||
else
|
||||
CC = xlC_r
|
||||
CCC = xlC_r
|
||||
endif
|
||||
OS_CFLAGS = -qro -qroconst
|
||||
ifeq ($(USE_64),1)
|
||||
OBJECT_MODE = 64
|
||||
export OBJECT_MODE
|
||||
COMPILER_TAG = _64
|
||||
else
|
||||
ifeq ($(HAVE_CCONF), 1)
|
||||
COMPILER_TAG =
|
||||
else
|
||||
COMPILER_TAG = _32
|
||||
endif
|
||||
endif
|
||||
|
||||
CPU_ARCH = rs6000
|
||||
|
||||
RANLIB = ranlib
|
||||
|
||||
OS_CFLAGS += -DAIX -DSYSV
|
||||
ifeq ($(CC),xlC_r)
|
||||
OS_CFLAGS += -qarch=com
|
||||
endif
|
||||
|
||||
ifneq ($(OS_RELEASE),3.2)
|
||||
OS_CFLAGS += -DAIX_HAVE_ATOMIC_OP_H -DAIX_TIMERS
|
||||
endif
|
||||
|
||||
ifeq (,$(filter-out 3.2 4.1,$(OS_RELEASE)))
|
||||
ifndef USE_PTHREADS
|
||||
OS_CFLAGS += -DAIX_RENAME_SELECT
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (,$(filter-out 3.2 4.1,$(OS_RELEASE)))
|
||||
OS_CFLAGS += -D_PR_NO_LARGE_FILES
|
||||
else
|
||||
OS_CFLAGS += -D_PR_HAVE_OFF64_T
|
||||
endif
|
||||
|
||||
ifeq ($(OS_RELEASE),4.1)
|
||||
OS_CFLAGS += -DAIX4_1
|
||||
else
|
||||
DSO_LDOPTS = -brtl -bM:SRE -bnoentry -bexpall
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
ifeq ($(OS_RELEASE),4.3)
|
||||
OS_CFLAGS += -DAIX4_3
|
||||
endif
|
||||
endif
|
||||
|
||||
# Have the socklen_t data type
|
||||
ifeq ($(OS_RELEASE),4.3)
|
||||
OS_CFLAGS += -DHAVE_SOCKLEN_T
|
||||
endif
|
||||
|
||||
ifeq (,$(filter-out 4.2 4.3,$(OS_RELEASE)))
|
||||
# On these OS revisions, localtime_r() is declared if _THREAD_SAFE
|
||||
# is defined.
|
||||
ifneq ($(CLASSIC_NSPR),1)
|
||||
OS_CFLAGS += -DHAVE_POINTER_LOCALTIME_R
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (,$(filter-out 4.3,$(OS_RELEASE)))
|
||||
# On these OS revisions, gethostbyXXX() returns result in thread
|
||||
# specific storage.
|
||||
ifeq ($(USE_PTHREADS),1)
|
||||
OS_CFLAGS += -D_PR_HAVE_THREADSAFE_GETHOST
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Special link info for constructing AIX programs. On AIX we have to
|
||||
# statically link programs that use NSPR into a single .o, rewriting the
|
||||
# calls to select to call "aix". Once that is done we then can
|
||||
# link that .o with a .o built in nspr which implements the system call.
|
||||
#
|
||||
ifneq (,$(filter-out 3.2 4.1,$(OS_RELEASE)))
|
||||
AIX_LINK_OPTS = -brtl -bnso -berok
|
||||
else
|
||||
AIX_LINK_OPTS = -bnso -berok
|
||||
#AIX_LINK_OPTS = -bnso -berok -brename:.select,.wrap_select -brename:.poll,.wrap_poll -bI:/usr/lib/syscalls.exp
|
||||
endif
|
||||
|
||||
AIX_WRAP = $(DIST)/lib/aixwrap.o
|
||||
AIX_TMP = $(OBJDIR)/_aix_tmp.o
|
||||
@@ -1,95 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for BSD/OS Unix.
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
ifeq (,$(filter-out 1.1 4.%,$(OS_RELEASE)))
|
||||
CC = gcc -Wall -Wno-format
|
||||
CCC = g++
|
||||
else
|
||||
CC = shlicc2
|
||||
CCC = shlicc2
|
||||
endif
|
||||
RANLIB = ranlib
|
||||
|
||||
ifeq ($(USE_PTHREADS),1)
|
||||
IMPL_STRATEGY = _PTH
|
||||
DEFINES += -D_PR_NEED_PTHREAD_INIT
|
||||
else
|
||||
IMPL_STRATEGY = _EMU
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
endif
|
||||
|
||||
OS_CFLAGS = $(DSO_CFLAGS) -DBSDI -DHAVE_STRERROR -DNEED_BSDREGEX
|
||||
|
||||
ifeq (86,$(findstring 86,$(OS_TEST)))
|
||||
CPU_ARCH = x86
|
||||
endif
|
||||
ifeq (sparc,$(findstring sparc,$(OS_TEST)))
|
||||
CPU_ARCH = sparc
|
||||
endif
|
||||
|
||||
ifeq ($(OS_RELEASE),2.1)
|
||||
OS_CFLAGS += -D_PR_TIMESPEC_HAS_TS_SEC
|
||||
endif
|
||||
|
||||
ifeq (,$(filter-out 1.1 2.1,$(OS_RELEASE)))
|
||||
OS_CFLAGS += -D_PR_BSDI_JMPBUF_IS_ARRAY
|
||||
else
|
||||
OS_CFLAGS += -D_PR_SELECT_CONST_TIMEVAL -D_PR_BSDI_JMPBUF_IS_STRUCT
|
||||
endif
|
||||
|
||||
NOSUCHFILE = /no-such-file
|
||||
|
||||
ifeq ($(OS_RELEASE),1.1)
|
||||
OS_CFLAGS += -D_PR_STAT_HAS_ONLY_ST_ATIME -D_PR_NEED_H_ERRNO
|
||||
else
|
||||
OS_CFLAGS += -DHAVE_DLL -DUSE_DLFCN -D_PR_STAT_HAS_ST_ATIMESPEC
|
||||
OS_LIBS = -ldl
|
||||
ifeq (,$(filter-out 4.%,$(OS_RELEASE)))
|
||||
MKSHLIB = $(CC) $(DSO_LDOPTS)
|
||||
DSO_CFLAGS = -fPIC
|
||||
DSO_LDOPTS = -shared -Wl,-soname,$(@:$(OBJDIR)/%.so=%.so)
|
||||
else
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
DSO_LDOPTS = -r
|
||||
endif
|
||||
endif
|
||||
@@ -1,142 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
|
||||
######################################################################
|
||||
# Config stuff for BeOS (all architectures)
|
||||
######################################################################
|
||||
|
||||
######################################################################
|
||||
# Version-independent
|
||||
######################################################################
|
||||
|
||||
DEFINES +=
|
||||
XP_DEFINE = -DXP_BEOS
|
||||
|
||||
OBJ_SUFFIX = o
|
||||
LIB_SUFFIX = a
|
||||
DLL_SUFFIX = so
|
||||
AR = ar cr $@
|
||||
|
||||
ifdef BUILD_OPT
|
||||
DEFINES = -UDEBUG -DNDEBUG
|
||||
OBJDIR_TAG = _OPT
|
||||
else
|
||||
DEFINES = -DDEBUG -UNDEBUG
|
||||
OBJDIR_TAG = _DBG
|
||||
endif
|
||||
|
||||
ifeq (PC,$(findstring PC,$(OS_TEST)))
|
||||
CPU_ARCH = x86
|
||||
CC = gcc
|
||||
CCC = g++
|
||||
LD = gcc
|
||||
RANLIB = ranlib
|
||||
DSO_LDOPTS = -nostart
|
||||
PORT_FLAGS = -DHAVE_STRERROR
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER = -O2
|
||||
LDFLAGS += -s
|
||||
else
|
||||
OPTIMIZER = -gdwarf-2 -O0
|
||||
endif
|
||||
else
|
||||
CPU_ARCH = ppc
|
||||
CC = mwcc
|
||||
CCC = mwcc
|
||||
LD = mwld
|
||||
RANLIB = ranlib
|
||||
DSO_LDOPTS = -xms -export pragma \
|
||||
-init _init_routine_ \
|
||||
-term _term_routine_ \
|
||||
-lroot -lnet \
|
||||
/boot/develop/lib/ppc/glue-noinit.a \
|
||||
/boot/develop/lib/ppc/init_term_dyn.o \
|
||||
/boot/develop/lib/ppc/start_dyn.o
|
||||
|
||||
PORT_FLAGS = -DHAVE_STRERROR -D_POSIX_SOURCE
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER = -O2
|
||||
else
|
||||
OPTIMIZER = -g -O0
|
||||
endif
|
||||
endif
|
||||
CPU_ARCH_TAG = _$(CPU_ARCH)
|
||||
|
||||
OS_INCLUDES = -I- -I.
|
||||
#G++INCLUDES = -I/usr/include/g++
|
||||
|
||||
PLATFORM_FLAGS = -DBeOS -DBEOS $(OS_INCLUDES)
|
||||
|
||||
OS_CFLAGS = $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)
|
||||
|
||||
USE_BTHREADS = 1
|
||||
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
|
||||
OBJDIR_NAME = $(OS_CONFIG)_$(CPU_ARCH)$(OBJDIR_TAG).OBJ
|
||||
|
||||
####################################################################
|
||||
#
|
||||
# One can define the makefile variable NSDISTMODE to control
|
||||
# how files are published to the 'dist' directory. If not
|
||||
# defined, the default is "install using relative symbolic
|
||||
# links". The two possible values are "copy", which copies files
|
||||
# but preserves source mtime, and "absolute_symlink", which
|
||||
# installs using absolute symbolic links. The "absolute_symlink"
|
||||
# option requires NFSPWD.
|
||||
#
|
||||
####################################################################
|
||||
|
||||
NSINSTALL = $(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall
|
||||
|
||||
ifeq ($(NSDISTMODE),copy)
|
||||
# copy files, but preserve source mtime
|
||||
INSTALL = $(NSINSTALL) -t
|
||||
else
|
||||
ifeq ($(NSDISTMODE),absolute_symlink)
|
||||
# install using absolute symbolic links
|
||||
INSTALL = $(NSINSTALL) -L `$(NFSPWD)`
|
||||
else
|
||||
# install using relative symbolic links
|
||||
INSTALL = $(NSINSTALL) -R
|
||||
endif
|
||||
endif
|
||||
|
||||
define MAKE_OBJDIR
|
||||
if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
|
||||
endef
|
||||
@@ -1,67 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for Data General DG/UX
|
||||
#
|
||||
# Initial DG/UX port by Marc Fraioli <fraioli@dg-rtp.dg.com>
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
CC = gcc
|
||||
CCC = g++
|
||||
|
||||
RANLIB = true
|
||||
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
OS_CFLAGS = -DSVR4 -DSYSV -DDGUX -D_DGUX_SOURCE -D_POSIX4A_DRAFT6_SOURCE
|
||||
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
DSO_LDOPTS = -G
|
||||
|
||||
CPU_ARCH = x86
|
||||
ARCH = dgux
|
||||
|
||||
NOSUCHFILE = /no-such-file
|
||||
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER = -O2
|
||||
else
|
||||
# -g would produce a huge executable.
|
||||
OPTIMIZER =
|
||||
endif
|
||||
@@ -1,86 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for FreeBSD
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
CC = gcc
|
||||
CCC = g++
|
||||
RANLIB = ranlib
|
||||
|
||||
ifeq ($(OS_TEST),alpha)
|
||||
CPU_ARCH = alpha
|
||||
else
|
||||
OS_REL_CFLAGS = -Di386
|
||||
CPU_ARCH = x86
|
||||
endif
|
||||
CPU_ARCH_TAG = _$(CPU_ARCH)
|
||||
|
||||
OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe $(THREAD_FLAG) -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
|
||||
|
||||
#
|
||||
# The default implementation strategy for FreeBSD is pthreads.
|
||||
#
|
||||
ifeq ($(CLASSIC_NSPR),1)
|
||||
IMPL_STRATEGY = _EMU
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
else
|
||||
USE_PTHREADS = 1
|
||||
IMPL_STRATEGY = _PTH
|
||||
DEFINES += -D_THREAD_SAFE
|
||||
THREAD_FLAG += -pthread
|
||||
endif
|
||||
|
||||
ARCH = freebsd
|
||||
|
||||
MOZ_OBJFORMAT := $(shell test -x /usr/bin/objformat && /usr/bin/objformat || echo aout)
|
||||
|
||||
ifeq ($(MOZ_OBJFORMAT),elf)
|
||||
DLL_SUFFIX = so
|
||||
else
|
||||
DLL_SUFFIX = so.1.0
|
||||
endif
|
||||
|
||||
DSO_CFLAGS = -fPIC
|
||||
DSO_LDOPTS = -Bshareable
|
||||
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
|
||||
G++INCLUDES = -I/usr/include/g++
|
||||
@@ -1,215 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for HP-UX
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
DLL_SUFFIX = sl
|
||||
|
||||
ifeq ($(NS_USE_GCC), 1)
|
||||
CC = gcc
|
||||
CCC = g++
|
||||
OS_CFLAGS =
|
||||
COMPILER_TAG = _gcc
|
||||
else
|
||||
CC = cc -Ae
|
||||
CCC = CC -ext
|
||||
OS_CFLAGS = +ESlit
|
||||
endif
|
||||
|
||||
RANLIB = echo
|
||||
|
||||
CPU_ARCH = hppa
|
||||
|
||||
OS_CFLAGS += $(DSO_CFLAGS) -DHPUX -D$(CPU_ARCH) -D_HPUX_SOURCE
|
||||
|
||||
#
|
||||
# The header netdb.h on HP-UX 9 does not declare h_errno.
|
||||
# On 10.10 and 10.20, netdb.h declares h_errno only if
|
||||
# _XOPEN_SOURCE_EXTENDED is defined. So we need to declare
|
||||
# h_errno ourselves.
|
||||
#
|
||||
ifeq ($(basename $(OS_RELEASE)),A.09)
|
||||
OS_CFLAGS += -D_PR_NEED_H_ERRNO
|
||||
endif
|
||||
ifeq (,$(filter-out B.10.10 B.10.20,$(OS_RELEASE)))
|
||||
OS_CFLAGS += -D_PR_NEED_H_ERRNO
|
||||
endif
|
||||
|
||||
# Do we have localtime_r()? Does it return 'int' or 'struct tm *'?
|
||||
ifeq (,$(filter-out B.10.10 B.10.20,$(OS_RELEASE)))
|
||||
OS_CFLAGS += -DHAVE_INT_LOCALTIME_R
|
||||
endif
|
||||
ifeq (,$(filter-out B.10.30 B.11.00,$(OS_RELEASE)))
|
||||
OS_CFLAGS += -DHAVE_POINTER_LOCALTIME_R
|
||||
endif
|
||||
|
||||
#
|
||||
# XXX
|
||||
# Temporary define for the Client; to be removed when binary release is used
|
||||
#
|
||||
ifdef MOZILLA_CLIENT
|
||||
CLASSIC_NSPR = 1
|
||||
endif
|
||||
|
||||
#
|
||||
# On HP-UX 9, the default (and only) implementation strategy is
|
||||
# classic nspr.
|
||||
#
|
||||
# On HP-UX 10.10 and 10.20, the default implementation strategy is
|
||||
# pthreads (actually DCE threads). Classic nspr is also available.
|
||||
#
|
||||
# On HP-UX 10.30 and 11.00, the default implementation strategy is
|
||||
# pthreads. Classic nspr and pthreads-user are also available.
|
||||
#
|
||||
ifeq ($(basename $(OS_RELEASE)),A.09)
|
||||
OS_CFLAGS += -DHPUX9
|
||||
DEFAULT_IMPL_STRATEGY = _EMU
|
||||
endif
|
||||
|
||||
ifeq ($(OS_RELEASE),B.10.01)
|
||||
OS_CFLAGS += -DHPUX10
|
||||
DEFAULT_IMPL_STRATEGY = _EMU
|
||||
endif
|
||||
|
||||
ifeq ($(OS_RELEASE),B.10.10)
|
||||
OS_CFLAGS += -DHPUX10 -DHPUX10_10
|
||||
DEFAULT_IMPL_STRATEGY = _PTH
|
||||
endif
|
||||
|
||||
ifeq ($(OS_RELEASE),B.10.20)
|
||||
OS_CFLAGS += -DHPUX10 -DHPUX10_20
|
||||
ifneq ($(NS_USE_GCC), 1)
|
||||
OS_CFLAGS += +DAportable
|
||||
endif
|
||||
DEFAULT_IMPL_STRATEGY = _PTH
|
||||
endif
|
||||
|
||||
#
|
||||
# On 10.30 and 11.00, we use the new ANSI C++ compiler aCC.
|
||||
#
|
||||
|
||||
ifeq ($(OS_RELEASE),B.10.30)
|
||||
ifneq ($(NS_USE_GCC), 1)
|
||||
CCC = /opt/aCC/bin/aCC -ext
|
||||
OS_CFLAGS += +DAportable +DS1.1
|
||||
endif
|
||||
OS_CFLAGS += -DHPUX10 -DHPUX10_30
|
||||
DEFAULT_IMPL_STRATEGY = _PTH
|
||||
endif
|
||||
|
||||
# 11.00 is similar to 10.30.
|
||||
ifeq ($(OS_RELEASE),B.11.00)
|
||||
ifneq ($(NS_USE_GCC), 1)
|
||||
CCC = /opt/aCC/bin/aCC -ext
|
||||
ifeq ($(USE_64),1)
|
||||
OS_CFLAGS += +DA2.0W +DS2.0 +DD64
|
||||
COMPILER_TAG = _64
|
||||
else
|
||||
OS_CFLAGS += +DAportable +DS2.0
|
||||
ifeq ($(HAVE_CCONF), 1)
|
||||
COMPILER_TAG =
|
||||
else
|
||||
COMPILER_TAG = _32
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
OS_CFLAGS += -DHPUX10 -DHPUX11 -D_LARGEFILE64_SOURCE -D_PR_HAVE_OFF64_T
|
||||
ifeq ($(HAVE_CCONF), 1)
|
||||
DEFAULT_IMPL_STRATEGY =
|
||||
else
|
||||
DEFAULT_IMPL_STRATEGY = _PTH
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(DEFAULT_IMPL_STRATEGY),_EMU)
|
||||
CLASSIC_NSPR = 1
|
||||
endif
|
||||
|
||||
ifeq ($(DEFAULT_IMPL_STRATEGY),_PTH)
|
||||
USE_PTHREADS = 1
|
||||
IMPL_STRATEGY = _PTH
|
||||
ifeq ($(CLASSIC_NSPR),1)
|
||||
USE_PTHREADS =
|
||||
IMPL_STRATEGY = _EMU
|
||||
endif
|
||||
ifeq ($(PTHREADS_USER),1)
|
||||
USE_PTHREADS =
|
||||
IMPL_STRATEGY = _PTH_USER
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CLASSIC_NSPR),1)
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
endif
|
||||
|
||||
ifeq (,$(filter-out A.09 B.10,$(basename $(OS_RELEASE))))
|
||||
DEFINES += -D_PR_NO_LARGE_FILES
|
||||
endif
|
||||
|
||||
#
|
||||
# To use the true pthread (kernel thread) library on 10.30 and
|
||||
# 11.00, we should define _POSIX_C_SOURCE to be 199506L.
|
||||
# The _REENTRANT macro is deprecated.
|
||||
#
|
||||
|
||||
ifdef USE_PTHREADS
|
||||
ifeq (,$(filter-out B.10.10 B.10.20,$(OS_RELEASE)))
|
||||
OS_CFLAGS += -D_REENTRANT -D_PR_DCETHREADS
|
||||
else
|
||||
OS_CFLAGS += -D_POSIX_C_SOURCE=199506L -D_PR_HAVE_THREADSAFE_GETHOST
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef PTHREADS_USER
|
||||
OS_CFLAGS += -D_POSIX_C_SOURCE=199506L
|
||||
endif
|
||||
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
|
||||
DSO_LDOPTS = -b +h $(notdir $@)
|
||||
|
||||
# -fPIC or +Z generates position independent code for use in shared
|
||||
# libraries.
|
||||
ifeq ($(NS_USE_GCC), 1)
|
||||
DSO_CFLAGS = -fPIC
|
||||
else
|
||||
DSO_CFLAGS = +Z
|
||||
endif
|
||||
@@ -1,162 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for IRIX
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
#
|
||||
# XXX
|
||||
# Temporary define for the Client; to be removed when binary release is used
|
||||
#
|
||||
ifdef MOZILLA_CLIENT
|
||||
ifneq ($(USE_PTHREADS),1)
|
||||
CLASSIC_NSPR = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# On IRIX 5.x, classic nspr (user-level threads on top of sprocs)
|
||||
# is the default (and only) implementation strategy.
|
||||
#
|
||||
# On IRIX 6.x and later, the default implementation strategy is
|
||||
# pthreads. Classic nspr is also available.
|
||||
#
|
||||
ifeq ($(basename $(OS_RELEASE)),5)
|
||||
CLASSIC_NSPR = 1
|
||||
endif
|
||||
|
||||
ifeq ($(CLASSIC_NSPR),1)
|
||||
IMPL_STRATEGY = _MxN
|
||||
else
|
||||
USE_PTHREADS = 1
|
||||
USE_N32 = 1
|
||||
IMPL_STRATEGY = _PTH
|
||||
endif
|
||||
|
||||
ifeq ($(NS_USE_GCC), 1)
|
||||
CC = gcc
|
||||
COMPILER_TAG = _gcc
|
||||
AS = $(CC) -x assembler-with-cpp -D_ASM -mips2
|
||||
ODD_CFLAGS = -Wall -Wno-format
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER = -O6
|
||||
endif
|
||||
else
|
||||
CC = cc
|
||||
CCC = CC
|
||||
ODD_CFLAGS = -fullwarn -xansi
|
||||
ifdef BUILD_OPT
|
||||
ifneq ($(USE_N32),1)
|
||||
OPTIMIZER = -O -Olimit 4000
|
||||
else
|
||||
OPTIMIZER = -O -OPT:Olimit=4000
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# The default behavior is still -o32 generation, hence the explicit tests
|
||||
# for -n32 and -64 and implicitly assuming -o32. If that changes, ...
|
||||
#
|
||||
ifeq ($(basename $(OS_RELEASE)),6)
|
||||
ODD_CFLAGS += -multigot
|
||||
SHLIB_LD_OPTS = -no_unresolved
|
||||
ifeq ($(USE_N32),1)
|
||||
ODD_CFLAGS += -n32 -woff 1209
|
||||
COMPILER_TAG = _n32
|
||||
LDOPTS += -n32
|
||||
SHLIB_LD_OPTS += -n32
|
||||
ifeq ($(OS_RELEASE), 6_2)
|
||||
LDOPTS += -Wl,-woff,85
|
||||
SHLIB_LD_OPTS += -woff 85
|
||||
endif
|
||||
else
|
||||
ifeq ($(USE_64),1)
|
||||
ODD_CFLAGS += -64
|
||||
COMPILER_TAG = _64
|
||||
else
|
||||
ODD_CFLAGS += -32
|
||||
COMPILER_TAG = _o32
|
||||
endif
|
||||
endif
|
||||
else
|
||||
ODD_CFLAGS += -xgot
|
||||
endif
|
||||
endif
|
||||
|
||||
ODD_CFLAGS += -DSVR4 -DIRIX
|
||||
|
||||
CPU_ARCH = mips
|
||||
|
||||
RANLIB = /bin/true
|
||||
|
||||
# For purify
|
||||
# XXX: should always define _SGI_MP_SOURCE
|
||||
NOMD_OS_CFLAGS = $(ODD_CFLAGS) -D_SGI_MP_SOURCE
|
||||
|
||||
ifeq ($(OS_RELEASE),5.3)
|
||||
OS_CFLAGS += -DIRIX5_3
|
||||
endif
|
||||
|
||||
ifneq ($(basename $(OS_RELEASE)),5)
|
||||
OS_CFLAGS += -D_PR_HAVE_SGI_PRDA_PROCMASK
|
||||
endif
|
||||
|
||||
ifeq (,$(filter-out 6.5,$(OS_RELEASE)))
|
||||
ifneq ($(NS_USE_GCC), 1)
|
||||
OS_CFLAGS += -mips3
|
||||
endif
|
||||
OS_CFLAGS += -D_PR_HAVE_GETPROTO_R -D_PR_HAVE_GETPROTO_R_POINTER
|
||||
ifeq ($(USE_PTHREADS),1)
|
||||
OS_CFLAGS += -D_PR_HAVE_GETHOST_R -D_PR_HAVE_GETHOST_R_POINTER
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef NO_MDUPDATE
|
||||
OS_CFLAGS += $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
|
||||
else
|
||||
OS_CFLAGS += $(NOMD_OS_CFLAGS)
|
||||
endif
|
||||
|
||||
# -rdata_shared is an ld option that puts string constants and
|
||||
# const data into the text segment, where they will be shared
|
||||
# across processes and be read-only.
|
||||
MKSHLIB = $(LD) $(SHLIB_LD_OPTS) -rdata_shared -shared -soname $(notdir $@)
|
||||
|
||||
DSO_LDOPTS = -elf -shared -all
|
||||
@@ -1,137 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
######################################################################
|
||||
# Config stuff for Linux (all architectures)
|
||||
######################################################################
|
||||
|
||||
######################################################################
|
||||
# Version-independent
|
||||
######################################################################
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
#
|
||||
# XXX
|
||||
# Temporary define for the Client; to be removed when binary release is used
|
||||
#
|
||||
ifdef MOZILLA_CLIENT
|
||||
ifneq ($(USE_PTHREADS),1)
|
||||
CLASSIC_NSPR = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# The default implementation strategy for Linux is pthreads.
|
||||
#
|
||||
ifeq ($(CLASSIC_NSPR),1)
|
||||
IMPL_STRATEGY = _EMU
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
else
|
||||
USE_PTHREADS = 1
|
||||
ifeq ($(HAVE_CCONF), 1)
|
||||
IMPL_STRATEGY = _glibc_PTH
|
||||
else
|
||||
IMPL_STRATEGY = _PTH
|
||||
endif
|
||||
DEFINES += -D_REENTRANT
|
||||
endif
|
||||
|
||||
ifeq (86,$(findstring 86,$(OS_TEST)))
|
||||
CPU_ARCH := x86
|
||||
else
|
||||
ifeq (,$(filter-out arm% sa110,$(OS_TEST)))
|
||||
CPU_ARCH := arm
|
||||
else
|
||||
CPU_ARCH := $(OS_TEST)
|
||||
endif
|
||||
endif
|
||||
CPU_ARCH_TAG = _$(CPU_ARCH)
|
||||
|
||||
CC = gcc
|
||||
CCC = g++
|
||||
RANLIB = ranlib
|
||||
|
||||
OS_INCLUDES =
|
||||
G++INCLUDES = -I/usr/include/g++
|
||||
|
||||
PLATFORM_FLAGS = -ansi -Wall -pipe -DLINUX -Dlinux
|
||||
PORT_FLAGS = -D_POSIX_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -DHAVE_STRERROR
|
||||
|
||||
OS_CFLAGS = $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)
|
||||
|
||||
######################################################################
|
||||
# Version-specific stuff
|
||||
######################################################################
|
||||
|
||||
ifeq ($(CPU_ARCH),alpha)
|
||||
PLATFORM_FLAGS += -D_ALPHA_ -D__alpha -mieee
|
||||
endif
|
||||
ifeq ($(CPU_ARCH),x86)
|
||||
PLATFORM_FLAGS += -Di386
|
||||
endif
|
||||
ifeq ($(CPU_ARCH),m68k)
|
||||
#
|
||||
# gcc on Linux/m68k either has a bug or triggers a code-sequence
|
||||
# bug in the 68060 which causes gcc to crash. The simplest way to
|
||||
# avoid this is to enable a minimum level of optimization.
|
||||
#
|
||||
ifndef BUILD_OPT
|
||||
OPTIMIZER += -O
|
||||
endif
|
||||
PLATFORM_FLAGS += -m68020-40
|
||||
endif
|
||||
|
||||
#
|
||||
# Linux 2.x has shared libraries.
|
||||
#
|
||||
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS) -soname $(notdir $@)
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER = -O2
|
||||
endif
|
||||
|
||||
######################################################################
|
||||
# Overrides for defaults in config.mk (or wherever)
|
||||
######################################################################
|
||||
|
||||
######################################################################
|
||||
# Other
|
||||
######################################################################
|
||||
|
||||
DSO_CFLAGS = -fPIC
|
||||
DSO_LDOPTS = -shared
|
||||
@@ -1,139 +0,0 @@
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#! gmake
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the
|
||||
# terms of the GNU General Public License Version 2 or later (the
|
||||
# "GPL"), in which case the provisions of the GPL are applicable
|
||||
# instead of those above. If you wish to allow use of your
|
||||
# version of this file only under the terms of the GPL and not to
|
||||
# allow others to use your version of this file under the MPL,
|
||||
# indicate your decision by deleting the provisions above and
|
||||
# replace them with the notice and other provisions required by
|
||||
# the GPL. If you do not delete the provisions above, a recipient
|
||||
# may use your version of this file under either the MPL or the
|
||||
# GPL.
|
||||
#
|
||||
|
||||
MOD_DEPTH = ..
|
||||
topsrcdir = ..
|
||||
srcdir = .
|
||||
|
||||
include $(MOD_DEPTH)/config/autoconf.mk
|
||||
|
||||
# Indicate that this directory builds build tools.
|
||||
INTERNAL_TOOLS = 1
|
||||
|
||||
# autoconf.mk must be deleted last (from the top-level directory)
|
||||
# because it is included by every makefile.
|
||||
DIST_GARBAGE =
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
ifndef MOZILLA_CLIENT
|
||||
CSRCS = nsinstall.c
|
||||
endif
|
||||
|
||||
CSRCS += now.c
|
||||
|
||||
PLSRCS = nfspwd.pl
|
||||
|
||||
ifneq (,$(CROSS_COMPILE)$(filter WINNT OS2,$(OS_ARCH)))
|
||||
PROG_SUFFIX = .exe
|
||||
else
|
||||
PROG_SUFFIX =
|
||||
endif
|
||||
|
||||
# Temporary workaround to disable the generation of
|
||||
# library build time because now.c uses the 'long long'
|
||||
# data type that's not available on some platforms.
|
||||
ifeq (,$(filter-out NEC NEXTSTEP QNX SCOOS UNIXWARE,$(OS_ARCH)))
|
||||
DEFINES += -DOMIT_LIB_BUILD_TIME
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), IRIX)
|
||||
ifeq ($(basename $(OS_RELEASE)),6)
|
||||
ifeq ($(USE_N32),1)
|
||||
XLDOPTS += -n32 -Wl,-woff,85
|
||||
ifeq ($(OS_RELEASE), 6_2)
|
||||
XLDOPTS += -Wl,-woff,85
|
||||
endif
|
||||
else
|
||||
ifeq ($(USE_64),1)
|
||||
XLDOPTS += -64
|
||||
else
|
||||
XLDOPTS += -32
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
ifeq ($(USE_64),1)
|
||||
XLDOPTS += +DA2.0W
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), OpenVMS)
|
||||
XLDOPTS += $(LDFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_OS2_TOOLS),EMX)
|
||||
XCFLAGS = $(OS_EXE_CFLAGS)
|
||||
XLDOPTS = -Zomf -Zlinker /PM:VIO
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||
OS_CFLAGS = $(OS_EXE_CFLAGS)
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
PROGS = $(OBJDIR)/now$(PROG_SUFFIX)
|
||||
|
||||
ifneq (,$(filter WINNT OS2,$(OS_ARCH)))
|
||||
TARGETS = $(PROGS)
|
||||
else
|
||||
PROGS += $(OBJDIR)/nsinstall$(PROG_SUFFIX)
|
||||
TARGETS = $(PROGS) $(PLSRCS:.pl=)
|
||||
endif
|
||||
|
||||
OUTOPTION = -o # end of the line
|
||||
ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)))
|
||||
ifndef NS_USE_GCC
|
||||
OUTOPTION = /Fe
|
||||
endif
|
||||
endif
|
||||
|
||||
# Redefine MAKE_OBJDIR for just this directory
|
||||
define MAKE_OBJDIR
|
||||
if test ! -d $(@D); then rm -rf $(@D); mkdir $(@D); else true; fi
|
||||
endef
|
||||
|
||||
export:: $(TARGETS)
|
||||
|
||||
$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
|
||||
@$(MAKE_OBJDIR)
|
||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||
$(LD) $(EXEFLAGS) $<
|
||||
else
|
||||
$(CC) $(XCFLAGS) $< $(XLDOPTS) $(OUTOPTION)$@
|
||||
endif
|
||||
@@ -1,143 +0,0 @@
|
||||
#! gmake
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
MOD_DEPTH = ..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(MOD_DEPTH)/config/autoconf.mk
|
||||
|
||||
# Indicate that this directory builds build tools.
|
||||
INTERNAL_TOOLS = 1
|
||||
|
||||
# autoconf.mk must be deleted last (from the top-level directory)
|
||||
# because it is included by every makefile.
|
||||
DIST_GARBAGE =
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
ifndef MOZILLA_CLIENT
|
||||
CSRCS = nsinstall.c
|
||||
endif
|
||||
|
||||
CSRCS += now.c
|
||||
|
||||
PLSRCS = nfspwd.pl
|
||||
|
||||
ifneq (,$(CROSS_COMPILE)$(filter WINNT OS2,$(OS_ARCH)))
|
||||
PROG_SUFFIX = .exe
|
||||
else
|
||||
PROG_SUFFIX =
|
||||
endif
|
||||
|
||||
# Temporary workaround to disable the generation of
|
||||
# library build time because now.c uses the 'long long'
|
||||
# data type that's not available on some platforms.
|
||||
ifeq (,$(filter-out NEC NEXTSTEP QNX SCOOS UNIXWARE,$(OS_ARCH)))
|
||||
DEFINES += -DOMIT_LIB_BUILD_TIME
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), IRIX)
|
||||
ifeq ($(basename $(OS_RELEASE)),6)
|
||||
ifeq ($(USE_N32),1)
|
||||
XLDOPTS += -n32 -Wl,-woff,85
|
||||
ifeq ($(OS_RELEASE), 6_2)
|
||||
XLDOPTS += -Wl,-woff,85
|
||||
endif
|
||||
else
|
||||
ifeq ($(USE_64),1)
|
||||
XLDOPTS += -64
|
||||
else
|
||||
XLDOPTS += -32
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
ifeq ($(USE_64),1)
|
||||
XLDOPTS += +DA2.0W
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), OpenVMS)
|
||||
XLDOPTS += $(LDFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_OS2_TOOLS),EMX)
|
||||
XCFLAGS = $(OS_EXE_CFLAGS)
|
||||
XLDOPTS = -Zomf -Zlinker -PM:VIO
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||
OS_CFLAGS = $(OS_EXE_CFLAGS)
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
PROGS = $(OBJDIR)/now$(PROG_SUFFIX)
|
||||
|
||||
ifneq (,$(filter WINNT OS2,$(OS_ARCH)))
|
||||
TARGETS = $(PROGS)
|
||||
else
|
||||
PROGS += $(OBJDIR)/nsinstall$(PROG_SUFFIX)
|
||||
TARGETS = $(PROGS) $(PLSRCS:.pl=)
|
||||
endif
|
||||
|
||||
OUTOPTION = -o # end of the line
|
||||
ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)))
|
||||
ifndef NS_USE_GCC
|
||||
OUTOPTION = -Fe
|
||||
endif
|
||||
endif
|
||||
|
||||
# Redefine MAKE_OBJDIR for just this directory
|
||||
define MAKE_OBJDIR
|
||||
if test ! -d $(@D); then rm -rf $(@D); mkdir $(@D); else true; fi
|
||||
endef
|
||||
|
||||
export:: $(TARGETS)
|
||||
|
||||
$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
|
||||
@$(MAKE_OBJDIR)
|
||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||
$(LD) $(EXEFLAGS) $<
|
||||
else
|
||||
$(CC) $(XCFLAGS) $< $(XLDOPTS) $(OUTOPTION)$@
|
||||
endif
|
||||
@@ -1,101 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for NCR SVR4 MP-RAS
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
###
|
||||
NS_USE_NATIVE = 1
|
||||
|
||||
# NS_USE_GCC = 1
|
||||
|
||||
export PATH:=$(PATH):/opt/ncc/bin
|
||||
###
|
||||
|
||||
RANLIB = true
|
||||
GCC_FLAGS_EXTRA = -pipe
|
||||
|
||||
DEFINES += -DSVR4 -DSYSV -DHAVE_STRERROR -DNCR -D_PR_LOCAL_THREADS_ONLY
|
||||
|
||||
ifeq (,$(filter-out 2.03,$(OS_RELEASE)))
|
||||
DEFINES += -D_PR_STAT_HAS_ST_ATIM
|
||||
else
|
||||
DEFINES += -D_PR_STAT_HAS_ST_ATIM_UNION
|
||||
endif
|
||||
|
||||
ifdef NS_USE_NATIVE
|
||||
CC = cc
|
||||
CCC = ncc
|
||||
OS_CFLAGS = -Hnocopyr
|
||||
#OS_LIBS = -L/opt/ncc/lib
|
||||
else
|
||||
#OS_LIBS =
|
||||
endif
|
||||
|
||||
CCC = g++
|
||||
|
||||
#OS_LIBS += -lsocket -lnsl -ldl -lc
|
||||
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
#DSO_LDOPTS = -G -z defs
|
||||
DSO_LDOPTS = -G
|
||||
|
||||
CPU_ARCH = x86
|
||||
ARCH = ncr
|
||||
|
||||
NOSUCHFILE = /no-such-file
|
||||
|
||||
# now take care of default GCC (rus@5/5/97)
|
||||
|
||||
ifdef NS_USE_GCC
|
||||
# if gcc-settings are redefined already - don't touch it
|
||||
#
|
||||
ifeq (,$(findstring gcc, $(CC)))
|
||||
CC = gcc
|
||||
CCC = g++
|
||||
CXX = g++
|
||||
COMPILER_TAG = _gcc
|
||||
# always use -fPIC - some makefiles are still broken and don't distinguish
|
||||
# situation when they build shared and static libraries
|
||||
CFLAGS += -fPIC -Wall $(GCC_FLAGS_EXTRA)
|
||||
#OS_LIBS += -L/usr/local/lib -lstdc++ -lg++ -lgcc
|
||||
endif
|
||||
endif
|
||||
###
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for NEC Mips SYSV
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
CPU_ARCH = mips
|
||||
|
||||
ifdef NS_USE_GCC
|
||||
CC = gcc
|
||||
CCC = g++
|
||||
else
|
||||
CC = $(NSDEPTH)/build/hcc cc -Xa -KGnum=0 -KOlimit=4000
|
||||
CCC = g++
|
||||
endif
|
||||
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
|
||||
RANLIB = /bin/true
|
||||
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
OS_CFLAGS = $(ODD_CFLAGS) -DSVR4 -D__SVR4 -DNEC -Dnec_ews -DHAVE_STRERROR
|
||||
OS_LIBS = -lsocket -lnsl -ldl $(LDOPTIONS)
|
||||
LDOPTIONS = -lc -L/usr/ucblib -lucb
|
||||
|
||||
NOSUCHFILE = /no-such-file
|
||||
|
||||
DSO_LDOPTS = -G
|
||||
@@ -1,78 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
######################################################################
|
||||
# Config stuff for Sony NEWS-OS
|
||||
######################################################################
|
||||
|
||||
######################################################################
|
||||
# Version-independent
|
||||
######################################################################
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
ARCH := sony
|
||||
CPU_ARCH := mips
|
||||
|
||||
CC = cc
|
||||
CCC = CC
|
||||
RANLIB = /bin/true
|
||||
|
||||
OS_INCLUDES = -I/usr/include
|
||||
G++INCLUDES =
|
||||
#OS_LIBS = -lsocket -lnsl -lgen -lresolv
|
||||
|
||||
PLATFORM_FLAGS = -Xa -fullwarn -DSONY
|
||||
PORT_FLAGS = -DSYSV -DSVR4 -D__svr4 -D__svr4__ -D_PR_LOCAL_THREADS_ONLY -DHAVE_SVID_GETTOD
|
||||
|
||||
OS_CFLAGS = $(PLATFORM_FLAGS) $(PORT_FLAGS)
|
||||
|
||||
######################################################################
|
||||
# Version-specific stuff
|
||||
######################################################################
|
||||
|
||||
######################################################################
|
||||
# Overrides for defaults in config.mk (or wherever)
|
||||
######################################################################
|
||||
|
||||
######################################################################
|
||||
# Other
|
||||
######################################################################
|
||||
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
|
||||
DSO_LDOPTS = -G
|
||||
@@ -1,72 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for NEXTSTEP
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
CC = cc
|
||||
CCC = cc++
|
||||
|
||||
RANLIB = ranlib
|
||||
|
||||
OS_REL_CFLAGS = -D$(shell uname -p)
|
||||
CPU_ARCH := $(shell uname -p)
|
||||
|
||||
# "Commons" are tentative definitions in a global scope, like this:
|
||||
# int x;
|
||||
# The meaning of a common is ambiguous. It may be a true definition:
|
||||
# int x = 0;
|
||||
# or it may be a declaration of a symbol defined in another file:
|
||||
# extern int x;
|
||||
# Use the -fno-common option to force all commons to become true
|
||||
# definitions so that the linker can catch multiply-defined symbols.
|
||||
# Also, common symbols are not allowed with Rhapsody dynamic libraries.
|
||||
|
||||
OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wall -fno-common -pipe -DNEXTSTEP -DHAVE_STRERROR -DHAVE_BSD_FLOCK -D_POSIX_SOURCE -traditional-cpp -posix
|
||||
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
|
||||
ARCH = $(CPU_ARCH)
|
||||
|
||||
# May override this with -bundle to create a loadable module.
|
||||
#DSO_LDOPTS = -dynamiclib
|
||||
|
||||
#MKSHLIB = $(CC) -arch $(CPU_ARCH) $(DSO_LDOPTS)
|
||||
DLL_SUFFIX = dylib
|
||||
@@ -1,94 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1999-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
######################################################################
|
||||
# Config stuff for Neutrino
|
||||
######################################################################
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
#
|
||||
# XXX
|
||||
# Temporary define for the Client; to be removed when binary release is used
|
||||
#
|
||||
ifdef MOZILLA_CLIENT
|
||||
ifneq ($(USE_PTHREADS),1)
|
||||
CLASSIC_NSPR = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# The default implementation strategy for Linux is pthreads.
|
||||
#
|
||||
ifeq ($(CLASSIC_NSPR),1)
|
||||
IMPL_STRATEGY = _EMU
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
else
|
||||
USE_PTHREADS = 1
|
||||
IMPL_STRATEGY = _PTH
|
||||
DEFINES += -D_REENTRANT
|
||||
endif
|
||||
|
||||
|
||||
AR = qcc -Vgcc_ntox86 -M -a $@
|
||||
CC = qcc -Vgcc_ntox86
|
||||
LD = $(CC)
|
||||
CCC = $(CC)
|
||||
|
||||
# Old Flags -DNO_REGEX -DSTRINGS_ALIGNED
|
||||
|
||||
OS_CFLAGS = -Wc,-Wall -Wc,-Wno-parentheses -DNTO \
|
||||
-D_QNX_SOURCE -DHAVE_POINTER_LOCALTIME_R -shared
|
||||
|
||||
COMPILER_TAG = _qcc
|
||||
MKSHLIB = qcc -Vgcc_ntox86 -shared -Wl,-h$(@:$(OBJDIR)/%.so=%.so) -M
|
||||
|
||||
RANLIB = ranlib
|
||||
G++INCLUDES =
|
||||
OS_LIBS =
|
||||
EXTRA_LIBS = -lsocket
|
||||
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER = -O1
|
||||
else
|
||||
OPTIMIZER = -O1 -gstabs
|
||||
endif
|
||||
|
||||
NOSUCHFILE = /no-such-file
|
||||
|
||||
GARBAGE += *.map
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for NetBSD
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
CC = gcc
|
||||
CCC = g++
|
||||
RANLIB = ranlib
|
||||
|
||||
ifndef OBJECT_FMT
|
||||
OBJECT_FMT := $(shell if echo __ELF__ | $${CC:-cc} -E - | grep -q __ELF__ ; then echo a.out ; else echo ELF ; fi)
|
||||
endif
|
||||
|
||||
OS_REL_CFLAGS =
|
||||
ifeq (86,$(findstring 86,$(OS_TEST)))
|
||||
CPU_ARCH = x86
|
||||
else
|
||||
CPU_ARCH = $(OS_TEST)
|
||||
endif
|
||||
|
||||
OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DNETBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
|
||||
|
||||
ifeq ($(USE_PTHREADS),1)
|
||||
OS_LIBS = -lc_r
|
||||
# XXX probably should define _THREAD_SAFE too.
|
||||
else
|
||||
OS_LIBS = -lc
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
endif
|
||||
|
||||
ARCH = netbsd
|
||||
|
||||
ifeq ($(OBJECT_FMT),ELF)
|
||||
DLL_SUFFIX = so
|
||||
else
|
||||
DLL_SUFFIX = so.1.0
|
||||
# XXX work around a bug in the a.out ld(1).
|
||||
OS_LIBS =
|
||||
endif
|
||||
|
||||
DSO_CFLAGS = -fPIC -DPIC
|
||||
DSO_LDOPTS = -shared
|
||||
ifeq ($(OBJECT_FMT),ELF)
|
||||
DSO_LDOPTS +=-Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
|
||||
endif
|
||||
|
||||
ifdef LIBRUNPATH
|
||||
DSO_LDOPTS += -Wl,-R$(LIBRUNPATH)
|
||||
endif
|
||||
|
||||
MKSHLIB = $(CC) $(DSO_LDOPTS)
|
||||
|
||||
G++INCLUDES = -I/usr/include/g++
|
||||
@@ -1,174 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Configuration common to all (supported) versions of OS/2
|
||||
#
|
||||
# OS_CFLAGS is the command line options for the compiler when
|
||||
# building the .DLL object files.
|
||||
# OS_EXE_CFLAGS is the command line options for the compiler
|
||||
# when building the .EXE object files; this is for the test
|
||||
# programs.
|
||||
# the macro OS_CFLAGS is set to OS_EXE_CFLAGS inside of the
|
||||
# makefile for the pr/tests directory. ... Hack.
|
||||
|
||||
# Specify toolset. Default to EMX.
|
||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||
XP_OS2_VACPP = 1
|
||||
else
|
||||
ifeq ($(MOZ_OS2_TOOLS),PGCC)
|
||||
XP_OS2_EMX = 1
|
||||
else
|
||||
MOZ_OS2_TOOLS = EMX
|
||||
XP_OS2_EMX = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(XP_OS2_EMX),1)
|
||||
MOZ_EMXTAG = $(subst .,,$(MOZ_OS2_EMX_OBJECTFORMAT))
|
||||
endif
|
||||
|
||||
#
|
||||
# On OS/2 we proudly support gbash...
|
||||
#
|
||||
SHELL = GBASH.EXE
|
||||
|
||||
CC = icc -q -DXP_OS2 -N10
|
||||
CCC = icc -q -DXP_OS2 -DOS2=4 -N10
|
||||
LINK = -ilink
|
||||
AR = -ilib /noignorecase /nologo /Out:$(subst /,\\,$@)
|
||||
RANLIB = @echo RANLIB
|
||||
BSDECHO = @echo BSDECHO
|
||||
NSINSTALL = nsinstall
|
||||
INSTALL = $(NSINSTALL)
|
||||
MAKE_OBJDIR = if test ! -d $(OBJDIR); then mkdir $(OBJDIR); fi
|
||||
IMPLIB = implib -nologo -noignorecase
|
||||
FILTER = cppfilt -b -p -q
|
||||
RC = rc.exe
|
||||
|
||||
GARBAGE =
|
||||
|
||||
XP_DEFINE = -DXP_PC
|
||||
LIB_SUFFIX = lib
|
||||
DLL_SUFFIX = dll
|
||||
OBJ_SUFFIX = obj
|
||||
|
||||
OS_CFLAGS = -W3 -Wcnd- -gm -gd+ -sd- -su4 -ge- -Mp
|
||||
OS_EXE_CFLAGS = -W3 -Wcnd- -gm -gd+ -sd- -su4 -Mp
|
||||
AR_EXTRA_ARGS =
|
||||
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER = -O+ -Oi
|
||||
DEFINES = -UDEBUG -U_DEBUG -DNDEBUG
|
||||
DLLFLAGS = -DLL -OUT:$@ -MAP:$(@:.dll=.map)
|
||||
EXEFLAGS = -PMTYPE:VIO -OUT:$@ -MAP:$(@:.exe=.map) -nologo -NOE
|
||||
OBJDIR_TAG = _OPT
|
||||
else
|
||||
OPTIMIZER = -Ti+ -DE
|
||||
DEFINES = -DDEBUG -D_DEBUG -DDEBUGPRINTS
|
||||
DLLFLAGS = -DEBUG -DLL -OUT:$@ -MAP:$(@:.dll=.map)
|
||||
EXEFLAGS = -DEBUG -PMTYPE:VIO -OUT:$@ -MAP:$(@:.exe=.map) -nologo -NOE
|
||||
OBJDIR_TAG = _DBG
|
||||
LDFLAGS = -DEBUG
|
||||
endif
|
||||
|
||||
DEFINES += -DOS2=4
|
||||
DEFINES += -D_X86_
|
||||
DEFINES += -D_PR_GLOBAL_THREADS_ONLY -DBSD_SELECT
|
||||
|
||||
# Name of the binary code directories
|
||||
ifdef MOZ_LITE
|
||||
OBJDIR_NAME = $(subst OS2,NAV,$(OS_CONFIG))_$(MOZ_OS2_TOOLS)$(MOZ_EMXTAG)$(OBJDIR_TAG).OBJ
|
||||
else
|
||||
OBJDIR_NAME = $(OS_CONFIG)_$(MOZ_OS2_TOOLS)$(MOZ_EMXTAG)$(OBJDIR_TAG).OBJ
|
||||
endif
|
||||
|
||||
OS_DLLFLAGS = -nologo -DLL -FREE -NOE
|
||||
|
||||
ifdef XP_OS2_VACPP
|
||||
|
||||
OS_LIBS = so32dll.lib tcp32dll.lib
|
||||
|
||||
DEFINES += -DXP_OS2_VACPP -DTCPV40HDRS
|
||||
|
||||
else
|
||||
CC = gcc
|
||||
CCC = gcc
|
||||
LINK = gcc
|
||||
RC = rc.exe
|
||||
FILTER = emxexp
|
||||
IMPLIB = emximp -o
|
||||
|
||||
# Determine which object format to use. Two choices:
|
||||
# a.out and omf. We default to omf.
|
||||
ifeq ($(MOZ_OS2_EMX_OBJECTFORMAT), A.OUT)
|
||||
AR = ar -q $@
|
||||
LIB_SUFFIX = a
|
||||
else
|
||||
OMF_FLAG = -Zomf
|
||||
AR = emxomfar r $@
|
||||
LIB_SUFFIX = lib
|
||||
endif
|
||||
|
||||
OS_LIBS = -lsocket -lemxio
|
||||
|
||||
DEFINES += -DXP_OS2 -DXP_OS2_EMX -DOS2EMX_PLAIN_CHAR
|
||||
|
||||
OS_CFLAGS = $(OMF_FLAG) -Wall -Wno-unused -Zmtd
|
||||
OS_EXE_CFLAGS = $(OMF_FLAG) -Wall -Wno-unused -Zmtd
|
||||
OS_DLLFLAGS = $(OMF_FLAG) -Zmt -Zdll -Zcrtdll -o $@
|
||||
ifeq ($(MOZ_OS2_EMX_OBJECTFORMAT),OMF)
|
||||
EXEFLAGS += -Zlinker /DE
|
||||
endif
|
||||
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER = -O3
|
||||
DLLFLAGS =
|
||||
EXEFLAGS = -Zmtd -o $@
|
||||
else
|
||||
OPTIMIZER = -g #-s
|
||||
DLLFLAGS = -g #-s
|
||||
EXEFLAGS = -g $(OMF_FLAG) -Zmtd -L$(DIST)/lib -o $@ # -s
|
||||
ifeq ($(MOZ_OS2_EMX_OBJECTFORMAT),OMF)
|
||||
EXEFLAGS += -Zlinker /DE
|
||||
endif
|
||||
endif
|
||||
|
||||
AR_EXTRA_ARGS =
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for DEC OSF/1
|
||||
#
|
||||
|
||||
#
|
||||
# The Bourne shell (sh) on OSF1 doesn't handle "set -e" correctly,
|
||||
# which we use to stop LOOP_OVER_DIRS submakes as soon as any
|
||||
# submake fails. So we use the Korn shell instead.
|
||||
#
|
||||
SHELL = /usr/bin/ksh
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
#
|
||||
# XXX
|
||||
# Temporary define for the Client; to be removed when binary release is used
|
||||
#
|
||||
ifdef MOZILLA_CLIENT
|
||||
ifneq ($(USE_PTHREADS),1)
|
||||
CLASSIC_NSPR = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Prior to OSF1 V4.0, classic nspr is the default (and only) implementation
|
||||
# strategy.
|
||||
#
|
||||
# On OSF1 V4.0, pthreads is the default implementation strategy.
|
||||
# Classic nspr is also available.
|
||||
#
|
||||
ifeq (,$(filter-out V2.0 V3.2,$(OS_RELEASE)))
|
||||
CLASSIC_NSPR = 1
|
||||
endif
|
||||
|
||||
ifeq ($(CLASSIC_NSPR), 1)
|
||||
IMPL_STRATEGY = _EMU
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
else
|
||||
USE_PTHREADS = 1
|
||||
ifeq ($(HAVE_CCONF), 1)
|
||||
IMPL_STRATEGY =
|
||||
else
|
||||
IMPL_STRATEGY = _PTH
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CCONF), 1)
|
||||
CC = cc $(NON_LD_FLAGS)
|
||||
else
|
||||
CC = cc $(NON_LD_FLAGS) -std1
|
||||
endif
|
||||
|
||||
ifneq ($(OS_RELEASE),V2.0)
|
||||
CC += -readonly_strings
|
||||
endif
|
||||
# The C++ compiler cxx has -readonly_strings on by default.
|
||||
CCC = cxx
|
||||
|
||||
RANLIB = /bin/true
|
||||
|
||||
CPU_ARCH = alpha
|
||||
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER += -Olimit 4000
|
||||
endif
|
||||
|
||||
NON_LD_FLAGS = -ieee_with_inexact
|
||||
|
||||
OS_CFLAGS = -DOSF1 -D_REENTRANT
|
||||
|
||||
ifeq ($(HAVE_CCONF), 1)
|
||||
OS_CFLAGS += -DIS_64 -DOSF1V4D -DOSF1
|
||||
endif
|
||||
|
||||
ifneq (,$(filter-out V2.0 V3.2,$(OS_RELEASE)))
|
||||
OS_CFLAGS += -DOSF1_HAVE_MACHINE_BUILTINS_H
|
||||
endif
|
||||
|
||||
ifeq (,$(filter-out V2.0 V3.2,$(OS_RELEASE)))
|
||||
OS_CFLAGS += -DHAVE_INT_LOCALTIME_R
|
||||
else
|
||||
OS_CFLAGS += -DHAVE_POINTER_LOCALTIME_R
|
||||
endif
|
||||
|
||||
ifeq (,$(filter-out V4.0%,$(OS_RELEASE)))
|
||||
OS_CFLAGS += -DOSF1V4_MAP_PRIVATE_BUG
|
||||
endif
|
||||
|
||||
ifeq ($(USE_PTHREADS),1)
|
||||
OS_CFLAGS += -pthread
|
||||
ifneq (,$(filter-out V2.0 V3.2,$(OS_RELEASE)))
|
||||
OS_CFLAGS += -D_PR_HAVE_THREADSAFE_GETHOST
|
||||
endif
|
||||
endif
|
||||
|
||||
# The command to build a shared library on OSF1.
|
||||
MKSHLIB = ld -shared -all -expect_unresolved "*" -soname $(notdir $@)
|
||||
DSO_LDOPTS = -shared
|
||||
@@ -1,82 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for OpenBSD
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
CC = gcc
|
||||
CCC = g++
|
||||
RANLIB = ranlib
|
||||
|
||||
OS_REL_CFLAGS =
|
||||
ifeq (86,$(findstring 86,$(OS_TEST)))
|
||||
CPU_ARCH = x86
|
||||
else
|
||||
CPU_ARCH = $(OS_TEST)
|
||||
endif
|
||||
|
||||
OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe $(THREAD_FLAG) -DOPENBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
|
||||
|
||||
ifeq ($(USE_PTHREADS),1)
|
||||
THREAD_FLAG += -pthread
|
||||
# XXX probably should define _THREAD_SAFE too.
|
||||
else
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
endif
|
||||
|
||||
ARCH = openbsd
|
||||
|
||||
DLL_SUFFIX = so.1.0
|
||||
|
||||
DSO_CFLAGS = -fPIC
|
||||
DSO_LDOPTS = -Bshareable
|
||||
ifeq ($(OS_TEST),alpha)
|
||||
DSO_LDOPTS = -shared
|
||||
endif
|
||||
ifeq ($(OS_TEST),mips)
|
||||
DSO_LDOPTS = -shared
|
||||
endif
|
||||
ifeq ($(OS_TEST),pmax)
|
||||
DSO_LDOPTS = -shared
|
||||
endif
|
||||
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
|
||||
G++INCLUDES = -I/usr/include/g++
|
||||
@@ -1,54 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for Compaq OpenVMS
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
RANLIB = /bin/true
|
||||
|
||||
CPU_ARCH_TAG = _$(CPU_ARCH)
|
||||
|
||||
#
|
||||
# XCFLAGS are the only CFLAGS that are used during a link operation. Defining
|
||||
# OPTIMIZER in XCFLAGS means that each compilation line gets OPTIMIZER
|
||||
# included twice, but at least we get OPTIMIZER included in the link
|
||||
# operations; and OpenVMS needs it!
|
||||
#
|
||||
XCFLAGS += $(OPTIMIZER)
|
||||
@@ -1,61 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
######################################################################
|
||||
# Config stuff for QNX.
|
||||
######################################################################
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
CPU_ARCH = x86
|
||||
|
||||
ifndef NS_USE_GCC
|
||||
CC = cc
|
||||
CCC = cc
|
||||
endif
|
||||
RANLIB = true
|
||||
|
||||
G++INCLUDES =
|
||||
OS_LIBS =
|
||||
XLDOPTS = -lunix
|
||||
|
||||
OS_CFLAGS = -DQNX -Di386 -D_PR_LOCAL_THREADS_ONLY -D_PR_NEED_H_ERRNO
|
||||
#IMPL_STRATEGY = _EMU
|
||||
|
||||
NOSUCHFILE = /no-such-file
|
||||
|
||||
GARBAGE = $(wildcard *.err)
|
||||
@@ -1,9 +0,0 @@
|
||||
This part of of the tree taken from NSPR 4.1. The
|
||||
NSPR config tree was tagged with:
|
||||
|
||||
cvs tag ldapcsdk_branch50-config
|
||||
|
||||
|
||||
The version of NSPR this was taken from:
|
||||
|
||||
NSPRPUB_RELEASE_4_1 (revision: 3.23)
|
||||
@@ -1,87 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for Rhapsody
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
#
|
||||
# The default implementation strategy for Rhapsody is pthreads.
|
||||
#
|
||||
ifeq ($(CLASSIC_NSPR),1)
|
||||
IMPL_STRATEGY = _EMU
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
else
|
||||
USE_PTHREADS = 1
|
||||
IMPL_STRATEGY = _PTH
|
||||
endif
|
||||
|
||||
CC = cc
|
||||
CCC = c++
|
||||
RANLIB = ranlib
|
||||
|
||||
ifeq (86,$(findstring 86,$(OS_TEST)))
|
||||
OS_REL_CFLAGS = -mno-486 -Di386
|
||||
CPU_ARCH = i386
|
||||
else
|
||||
OS_REL_CFLAGS = -Dppc
|
||||
CPU_ARCH = ppc
|
||||
endif
|
||||
|
||||
# "Commons" are tentative definitions in a global scope, like this:
|
||||
# int x;
|
||||
# The meaning of a common is ambiguous. It may be a true definition:
|
||||
# int x = 0;
|
||||
# or it may be a declaration of a symbol defined in another file:
|
||||
# extern int x;
|
||||
# Use the -fno-common option to force all commons to become true
|
||||
# definitions so that the linker can catch multiply-defined symbols.
|
||||
# Also, common symbols are not allowed with Rhapsody dynamic libraries.
|
||||
|
||||
OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wmost -fno-common -pipe -DRHAPSODY -DHAVE_STRERROR -DHAVE_BSD_FLOCK
|
||||
|
||||
ARCH = rhapsody
|
||||
|
||||
# May override this with -bundle to create a loadable module.
|
||||
DSO_LDOPTS = -dynamiclib -compatibility_version 1 -current_version 1 -all_load
|
||||
|
||||
MKSHLIB = $(CC) -arch $(CPU_ARCH) $(DSO_LDOPTS)
|
||||
DLL_SUFFIX = dylib
|
||||
|
||||
G++INCLUDES = -I/usr/include/g++
|
||||
@@ -1,67 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for SCO OpenServer for x86.
|
||||
# SCO OpenServer 5, based on SVR3.2, is intended for small to
|
||||
# medium customers.
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
CC = cc -b elf -KPIC
|
||||
CCC = $(NSDEPTH)/build/hcpp CC +.cpp +w
|
||||
RANLIB = /bin/true
|
||||
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
#
|
||||
# -DSCO - Changes to Netscape source (consistent with AIX, LINUX, etc..)
|
||||
# -Dsco - Needed for /usr/include/X11/*
|
||||
#
|
||||
OS_CFLAGS = -DSYSV -D_SVID3 -DHAVE_STRERROR -D_PR_NEED_H_ERRNO -DSCO -Dsco
|
||||
#OS_LIBS = -lpmapi -lsocket -lc
|
||||
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
|
||||
CPU_ARCH = x86
|
||||
ARCH = sco
|
||||
|
||||
NOSUCHFILE = /no-such-file
|
||||
|
||||
BSDECHO = /bin/echo
|
||||
|
||||
DSO_LDOPTS = -b elf -G
|
||||
@@ -1,112 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for SNI SINIX (aka ReliantUNIX)
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
ifeq (86,$(findstring 86,$(OS_TEST)))
|
||||
CPU_ARCH = x86
|
||||
else
|
||||
CPU_ARCH = mips
|
||||
endif
|
||||
CPU_ARCH_TAG = _$(CPU_ARCH)
|
||||
|
||||
# use gcc -tf-
|
||||
NS_USE_GCC = 1
|
||||
|
||||
ifeq ($(NS_USE_GCC),1)
|
||||
## gcc-2.7.2 homebrewn
|
||||
CC = gcc
|
||||
COMPILER_TAG = _gcc
|
||||
CCC = g++
|
||||
AS = $(CC) -x assembler-with-cpp
|
||||
ifeq ($(CPU_ARCH),mips)
|
||||
LD = gld
|
||||
endif
|
||||
ODD_CFLAGS = -Wall -Wno-format
|
||||
ifeq ($(CPU_ARCH),mips)
|
||||
# The -pipe flag only seems to work on the mips version of SINIX.
|
||||
ODD_CFLAGS += -pipe
|
||||
endif
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER = -O
|
||||
#OPTIMIZER = -O6
|
||||
endif
|
||||
MKSHLIB = $(LD) -G -z defs -h $(@:$(OBJDIR)/%.so=%.so)
|
||||
#DSO_LDOPTS = -G -Xlinker -Blargedynsym
|
||||
else
|
||||
## native compiler (CDS++ 1.0)
|
||||
CC = /usr/bin/cc
|
||||
CCC = /usr/bin/CC
|
||||
AS = /usr/bin/cc
|
||||
#ODD_CFLAGS = -fullwarn -xansi
|
||||
ODD_CFLAGS =
|
||||
ifdef BUILD_OPT
|
||||
#OPTIMIZER = -Olimit 4000
|
||||
OPTIMIZER = -O -F Olimit,4000
|
||||
endif
|
||||
MKSHLIB = $(LD) -G -z defs -h $(@:$(OBJDIR)/%.so=%.so)
|
||||
#DSO_LDOPTS = -G -W l,-Blargedynsym
|
||||
endif
|
||||
|
||||
ifeq ($(CPU_ARCH),x86)
|
||||
DEFINES += -Di386
|
||||
endif
|
||||
|
||||
ODD_CFLAGS += -DSVR4 -DSNI -DRELIANTUNIX -Dsinix -DHAVE_SVID_GETTOD
|
||||
|
||||
# On SINIX 5.43, need to define IP_MULTICAST in order to get the
|
||||
# IP multicast macro and struct definitions in netinet/in.h.
|
||||
# (SINIX 5.42 does not have IP multicast at all.)
|
||||
ifeq ($(OS_RELEASE),5.43)
|
||||
ODD_CFLAGS += -DIP_MULTICAST
|
||||
endif
|
||||
|
||||
RANLIB = /bin/true
|
||||
|
||||
# For purify
|
||||
NOMD_OS_CFLAGS = $(ODD_CFLAGS)
|
||||
|
||||
# we do not have -MDupdate ...
|
||||
OS_CFLAGS = $(NOMD_OS_CFLAGS)
|
||||
OS_LIBS = -lsocket -lnsl -lresolv -ldl -lc
|
||||
NOSUCHFILE = /no-such-file
|
||||
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
@@ -1,46 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for SunOS.
|
||||
# 4 and 5 are vastly different, so we use 2 different files.
|
||||
#
|
||||
ifeq ($(basename $(OS_RELEASE)),4.1)
|
||||
include $(MOD_DEPTH)/config/SunOS4.mk
|
||||
else
|
||||
include $(MOD_DEPTH)/config/SunOS5.mk
|
||||
endif
|
||||
@@ -1,72 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for SunOS4.1
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
# SunOS 4 _requires_ that shared libs have a version number.
|
||||
# XXX FIXME: Version number should use NSPR_VERSION_NUMBER?
|
||||
DLL_SUFFIX = so.1.0
|
||||
|
||||
CC = gcc
|
||||
CCC = g++
|
||||
COMPILER_TAG = _gcc
|
||||
|
||||
RANLIB = ranlib
|
||||
|
||||
CPU_ARCH = sparc
|
||||
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
# Purify doesn't like -MDupdate
|
||||
NOMD_OS_CFLAGS = -Wall -Wno-format -DSUNOS4
|
||||
|
||||
ifdef NO_MDUPDATE
|
||||
OS_CFLAGS = $(DSO_CFLAGS) $(NOMD_OS_CFLAGS)
|
||||
else
|
||||
OS_CFLAGS = $(DSO_CFLAGS) $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
|
||||
endif
|
||||
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
|
||||
NOSUCHFILE = /no-such-file
|
||||
|
||||
DSO_LDOPTS =
|
||||
# -fPIC generates position-independent code for use in a shared library.
|
||||
DSO_CFLAGS = -fPIC
|
||||
@@ -1,53 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape security libraries.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
# Config stuff for Solaris 8 on x86
|
||||
#
|
||||
|
||||
SOL_CFLAGS = -D_SVID_GETTOD
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/SunOS5.mk
|
||||
|
||||
CPU_ARCH = x86
|
||||
ARCHFLAG =
|
||||
OS_DEFINES += -Di386
|
||||
|
||||
ifeq ($(OS_RELEASE),5.8_i86pc)
|
||||
OS_DEFINES += -DSOLARIS2_8
|
||||
endif
|
||||
|
||||
OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc
|
||||
@@ -1,48 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape security libraries.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1994-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
# Config stuff for SunOS5.9
|
||||
|
||||
SOL_CFLAGS += -D_SVID_GETTOD
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/SunOS5.mk
|
||||
|
||||
ifeq ($(OS_RELEASE),5.9)
|
||||
OS_DEFINES += -DSOLARIS2_9
|
||||
endif
|
||||
|
||||
OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc
|
||||
@@ -1,52 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape security libraries.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
# Config stuff for Solaris 9 on x86
|
||||
|
||||
SOL_CFLAGS = -D_SVID_GETTOD
|
||||
|
||||
include $(CORE_DEPTH)/coreconf/SunOS5.mk
|
||||
|
||||
CPU_ARCH = x86
|
||||
ARCHFLAG =
|
||||
OS_DEFINES += -Di386
|
||||
|
||||
ifeq ($(OS_RELEASE),5.9_i86pc)
|
||||
OS_DEFINES += -DSOLARIS2_9
|
||||
endif
|
||||
|
||||
OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc
|
||||
@@ -1,218 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for SunOS 5.x on sparc and x86
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
#
|
||||
# XXX
|
||||
# Temporary define for the Client; to be removed when binary release is used
|
||||
#
|
||||
ifdef MOZILLA_CLIENT
|
||||
ifneq ($(USE_PTHREADS),1)
|
||||
LOCAL_THREADS_ONLY = 1
|
||||
endif
|
||||
ifndef NS_USE_NATIVE
|
||||
NS_USE_GCC = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# The default implementation strategy on Solaris is pthreads.
|
||||
# Global threads only and local threads only are also available.
|
||||
#
|
||||
ifeq ($(GLOBAL_THREADS_ONLY),1)
|
||||
IMPL_STRATEGY = _NATIVE
|
||||
DEFINES += -D_PR_GLOBAL_THREADS_ONLY
|
||||
else
|
||||
ifeq ($(LOCAL_THREADS_ONLY),1)
|
||||
IMPL_STRATEGY = _EMU
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
else
|
||||
USE_PTHREADS = 1
|
||||
ifeq ($(HAVE_CCONF), 1)
|
||||
IMPL_STRATEGY =
|
||||
else
|
||||
IMPL_STRATEGY = _PTH
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(NS_USE_GCC), 1)
|
||||
CC = gcc -Wall
|
||||
CCC = g++ -Wall
|
||||
ASFLAGS += -Wa,-P
|
||||
COMPILER_TAG = _gcc
|
||||
ifdef NO_MDUPDATE
|
||||
OS_CFLAGS = $(NOMD_OS_CFLAGS)
|
||||
else
|
||||
OS_CFLAGS = $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
|
||||
endif
|
||||
else
|
||||
CC = cc -xstrconst
|
||||
CCC = CC -Qoption cg -xstrconst
|
||||
ASFLAGS += -Wa,-P
|
||||
OS_CFLAGS = $(NOMD_OS_CFLAGS)
|
||||
#
|
||||
# If we are building for a release, we want to put all symbol
|
||||
# tables in the debug executable or share library instead of
|
||||
# the .o files, so that our clients can run dbx on the debug
|
||||
# library without having the .o files around.
|
||||
#
|
||||
ifdef BUILD_NUMBER
|
||||
ifndef BUILD_OPT
|
||||
OS_CFLAGS += -xs
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(USE_64),1)
|
||||
ifndef INTERNAL_TOOLS
|
||||
ifneq ($(NS_USE_GCC), 1)
|
||||
CC += -xarch=v9
|
||||
CCC += -xarch=v9
|
||||
endif
|
||||
endif
|
||||
COMPILER_TAG = _64
|
||||
else
|
||||
ifeq ($(HAVE_CCONF), 1)
|
||||
COMPILER_TAG =
|
||||
else
|
||||
COMPILER_TAG = _32
|
||||
endif
|
||||
endif
|
||||
|
||||
RANLIB = echo
|
||||
|
||||
OS_DEFINES = -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS
|
||||
|
||||
ifeq ($(OS_TEST),i86pc)
|
||||
CPU_ARCH = x86
|
||||
COMPILER_TAG = _i86pc
|
||||
OS_DEFINES += -Di386
|
||||
# The default debug format, DWARF (-g), is not supported by gcc
|
||||
# on i386-ANY-sysv4/solaris, but the stabs format is. It is
|
||||
# assumed that the Solaris assembler /usr/ccs/bin/as is used.
|
||||
# If your gcc uses GNU as, you do not need the -Wa,-s option.
|
||||
ifndef BUILD_OPT
|
||||
ifeq ($(NS_USE_GCC), 1)
|
||||
OPTIMIZER = -Wa,-s -gstabs
|
||||
endif
|
||||
endif
|
||||
else
|
||||
ifeq ($(HAVE_CCONF), 1)
|
||||
CPU_ARCH =
|
||||
else
|
||||
CPU_ARCH = sparc
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CCONF), 1)
|
||||
CPU_ARCH_TAG =
|
||||
else
|
||||
CPU_ARCH_TAG = _$(CPU_ARCH)
|
||||
endif
|
||||
|
||||
ifeq (5.5,$(findstring 5.5,$(OS_RELEASE)))
|
||||
OS_DEFINES += -DSOLARIS2_5
|
||||
else
|
||||
ifeq (,$(filter-out 5.3 5.4,$(OS_RELEASE)))
|
||||
OS_DEFINES += -D_PR_NO_LARGE_FILES
|
||||
else
|
||||
OS_DEFINES += -D_PR_HAVE_OFF64_T
|
||||
# The lfcompile64(5) man page on Solaris 2.6 says:
|
||||
# For applications that do not wish to conform to the POSIX or
|
||||
# X/Open specifications, the 64-bit transitional interfaces
|
||||
# are available by default. No compile-time flags need to be
|
||||
# set.
|
||||
# But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
|
||||
# The native compiler, gcc 2.8.x, and egcs don't have this problem.
|
||||
ifeq ($(NS_USE_GCC), 1)
|
||||
OS_DEFINES += -D_LARGEFILE64_SOURCE
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(LOCAL_THREADS_ONLY),1)
|
||||
OS_DEFINES += -D_REENTRANT -DHAVE_POINTER_LOCALTIME_R
|
||||
endif
|
||||
|
||||
# Purify doesn't like -MDupdate
|
||||
NOMD_OS_CFLAGS = $(DSO_CFLAGS) $(OS_DEFINES) $(SOL_CFLAGS)
|
||||
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
|
||||
# ld options:
|
||||
# -G: produce a shared object
|
||||
# -z defs: no unresolved symbols allowed
|
||||
DSO_LDOPTS = -G -h $(notdir $@)
|
||||
|
||||
# -KPIC generates position independent code for use in shared libraries.
|
||||
# (Similarly for -fPIC in case of gcc.)
|
||||
ifeq ($(NS_USE_GCC), 1)
|
||||
DSO_CFLAGS = -fPIC
|
||||
else
|
||||
DSO_CFLAGS = -KPIC
|
||||
endif
|
||||
|
||||
NOSUCHFILE = /no-such-file
|
||||
|
||||
#
|
||||
# Library of atomic functions for UltraSparc systems
|
||||
#
|
||||
# The nspr makefiles build ULTRASPARC_LIBRARY (which contains assembly language
|
||||
# implementation of the nspr atomic functions for UltraSparc systems) in addition
|
||||
# to libnspr.so. (The actual name of the library is
|
||||
# lib$(ULTRASPARC_LIBRARY)$(MOD_VERSION).so
|
||||
#
|
||||
# The actual name of the filter-library, recorded in libnspr.so, is set to the
|
||||
# value of $(ULTRASPARC_FILTER_LIBRARY).
|
||||
# For an application to use the assembly-language implementation, a link should be
|
||||
# made so that opening ULTRASPARC_FILTER_LIBRARY results in opening
|
||||
# ULTRASPARC_LIBRARY. This indirection requires the user to explicitly set up
|
||||
# library for use on UltraSparc systems, thereby helping to avoid using it by
|
||||
# accident on non-UltraSparc systems.
|
||||
# The directory containing the ultrasparc libraries should be in LD_LIBRARY_PATH.
|
||||
#
|
||||
ifeq ($(OS_TEST),sun4u)
|
||||
ULTRASPARC_LIBRARY = ultrasparc
|
||||
ULTRASPARC_FILTER_LIBRARY = libatomic.so
|
||||
DSO_LDOPTS += -f $(ULTRASPARC_FILTER_LIBRARY)
|
||||
endif
|
||||
@@ -1,95 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
PR_UNIXOS = 1
|
||||
XP_DEFINE = -DXP_UNIX
|
||||
OBJ_SUFFIX = o
|
||||
LIB_SUFFIX = a
|
||||
DLL_SUFFIX = so
|
||||
AR = ar cr $@
|
||||
|
||||
ifdef BUILD_OPT
|
||||
OPTIMIZER = -O
|
||||
DEFINES = -UDEBUG -DNDEBUG
|
||||
OBJDIR_TAG = _OPT
|
||||
else
|
||||
OPTIMIZER = -g
|
||||
DEFINES = -DDEBUG -UNDEBUG -DDEBUG_$(shell whoami)
|
||||
OBJDIR_TAG = _DBG
|
||||
endif
|
||||
|
||||
# Name of the binary code directories
|
||||
ifdef MOZILLA_CLIENT
|
||||
OBJDIR_NAME = $(OS_CONFIG)$(CPU_ARCH_TAG)$(OBJDIR_TAG).OBJ
|
||||
else
|
||||
OBJDIR_NAME = $(OS_CONFIG)$(CPU_ARCH_TAG)$(COMPILER_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
|
||||
endif
|
||||
|
||||
MKDEPEND_DIR = $(DEPTH)/config/mkdepend
|
||||
MKDEPEND = $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend
|
||||
MKDEPENDENCIES = $(OBJDIR)/depend.mk
|
||||
|
||||
####################################################################
|
||||
#
|
||||
# One can define the makefile variable NSDISTMODE to control
|
||||
# how files are published to the 'dist' directory. If not
|
||||
# defined, the default is "install using relative symbolic
|
||||
# links". The two possible values are "copy", which copies files
|
||||
# but preserves source mtime, and "absolute_symlink", which
|
||||
# installs using absolute symbolic links. The "absolute_symlink"
|
||||
# option requires NFSPWD.
|
||||
#
|
||||
####################################################################
|
||||
|
||||
NSINSTALL = $(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall
|
||||
|
||||
ifeq ($(NSDISTMODE),copy)
|
||||
# copy files, but preserve source mtime
|
||||
INSTALL = $(NSINSTALL) -t
|
||||
else
|
||||
ifeq ($(NSDISTMODE),absolute_symlink)
|
||||
# install using absolute symbolic links
|
||||
INSTALL = $(NSINSTALL) -L `$(NFSPWD)`
|
||||
else
|
||||
# install using relative symbolic links
|
||||
INSTALL = $(NSINSTALL) -R
|
||||
endif
|
||||
endif
|
||||
|
||||
define MAKE_OBJDIR
|
||||
if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); else true; fi
|
||||
endef
|
||||
@@ -1,75 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for SCO UnixWare
|
||||
# UnixWare is intended for high-end enterprise customers.
|
||||
# UnixWare 2.1 and 2.1.1 are based on SVR4. (2.1.2 is a maintenance
|
||||
# release.)
|
||||
# UnixWare 7 (codename Gemini) is based on what SCO calls SVR5.
|
||||
# The somewhat odd version number 7 was chosen to suggest that
|
||||
# UnixWare 2 + OpenServer 5 = UnixWare 7
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/UNIX.mk
|
||||
|
||||
ifeq (,$(filter-out 2.1,$(OS_RELEASE)))
|
||||
CC = $(NSDEPTH)/build/hcc cc
|
||||
CCC = $(NSDEPTH)/build/hcpp CC
|
||||
else
|
||||
CC = cc
|
||||
CCC = CC
|
||||
endif
|
||||
|
||||
RANLIB = true
|
||||
|
||||
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
||||
OS_CFLAGS = -DSVR4 -DSYSV -DUNIXWARE
|
||||
|
||||
ifeq (,$(filter-out 2.1,$(OS_RELEASE)))
|
||||
OS_CFLAGS += -D_PR_NO_LARGE_FILES
|
||||
else
|
||||
OS_CFLAGS += -D_LARGEFILE64_SOURCE -D_PR_HAVE_OFF64_T -D_PR_HAVE_SOCKADDR_LEN
|
||||
endif
|
||||
|
||||
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
||||
DSO_LDOPTS = -G
|
||||
|
||||
CPU_ARCH = x86
|
||||
ARCH = sco
|
||||
|
||||
NOSUCHFILE = /no-such-file
|
||||
@@ -1,179 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Configuration common to all versions of Windows NT
|
||||
# and Windows 95.
|
||||
#
|
||||
|
||||
#
|
||||
# Client build: make sure we use the shmsdos.exe under $(MOZ_TOOLS).
|
||||
# $(MOZ_TOOLS_FLIPPED) is $(MOZ_TOOLS) with all the backslashes
|
||||
# flipped, so that gmake won't interpret them as escape characters.
|
||||
#
|
||||
ifdef PR_CLIENT_BUILD_WINDOWS
|
||||
SHELL = $(MOZ_TOOLS_FLIPPED)/bin/shmsdos.exe
|
||||
endif
|
||||
|
||||
CC = cl
|
||||
CCC = cl
|
||||
LINK = link
|
||||
AR = lib -NOLOGO -OUT:"$@"
|
||||
RANLIB = echo
|
||||
BSDECHO = echo
|
||||
NSINSTALL = nsinstall
|
||||
INSTALL = $(NSINSTALL)
|
||||
define MAKE_OBJDIR
|
||||
if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
|
||||
endef
|
||||
RC = rc.exe
|
||||
|
||||
GARBAGE = $(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb
|
||||
|
||||
XP_DEFINE = -DXP_PC
|
||||
OBJ_SUFFIX = obj
|
||||
LIB_SUFFIX = lib
|
||||
DLL_SUFFIX = dll
|
||||
|
||||
OS_CFLAGS = -W3 -nologo -GF -Gy
|
||||
|
||||
ifdef BUILD_OPT
|
||||
OS_CFLAGS += -MD
|
||||
OPTIMIZER = -O2
|
||||
DEFINES = -UDEBUG -U_DEBUG -DNDEBUG
|
||||
DLLFLAGS = -OUT:"$@"
|
||||
OBJDIR_TAG = _OPT
|
||||
|
||||
# Add symbolic information for use by a profiler
|
||||
ifdef MOZ_PROFILE
|
||||
OPTIMIZER += -Zi
|
||||
DLLFLAGS += -DEBUG
|
||||
LDFLAGS += -DEBUG
|
||||
endif
|
||||
|
||||
else
|
||||
#
|
||||
# Define USE_DEBUG_RTL if you want to use the debug runtime library
|
||||
# (RTL) in the debug build
|
||||
#
|
||||
ifdef USE_DEBUG_RTL
|
||||
OS_CFLAGS += -MDd
|
||||
else
|
||||
OS_CFLAGS += -MD
|
||||
endif
|
||||
OPTIMIZER = -Od -Zi
|
||||
#OPTIMIZER = -Zi -Fd$(OBJDIR)/ -Od
|
||||
DEFINES = -DDEBUG -D_DEBUG -UNDEBUG
|
||||
|
||||
DLLFLAGS = -DEBUG -OUT:"$@"
|
||||
ifdef GLOWCODE
|
||||
DLLFLAGS = -DEBUG -DEBUGTYPE:both -INCLUDE:_GlowCode -OUT:"$@"
|
||||
endif
|
||||
|
||||
OBJDIR_TAG = _DBG
|
||||
LDFLAGS = -DEBUG
|
||||
#
|
||||
# When PROFILE=1 is defined, set the compile and link options
|
||||
# to build targets for use by the ms-win32 profiler
|
||||
#
|
||||
ifdef PROFILE
|
||||
LDFLAGS += -PROFILE -MAP
|
||||
DLLFLAGS += -PROFILE -MAP
|
||||
endif
|
||||
endif
|
||||
|
||||
DEFINES += -DWIN32 -D_WINDOWS
|
||||
|
||||
#
|
||||
# On Win95, we use the TlsXXX() interface by default because that
|
||||
# allows us to load the NSPR DLL dynamically at run time.
|
||||
# If you want to use static thread-local storage (TLS) for better
|
||||
# performance, build the NSPR library with USE_STATIC_TLS=1.
|
||||
#
|
||||
ifeq ($(USE_STATIC_TLS),1)
|
||||
DEFINES += -D_PR_USE_STATIC_TLS
|
||||
endif
|
||||
|
||||
#
|
||||
# NSPR uses both fibers and static thread-local storage
|
||||
# (i.e., __declspec(thread) variables) on NT. We need the -GT
|
||||
# flag to turn off certain compiler optimizations so that fibers
|
||||
# can use static TLS safely.
|
||||
#
|
||||
# Also, we optimize for Pentium (-G5) on NT.
|
||||
#
|
||||
ifeq ($(OS_TARGET),WINNT)
|
||||
OS_CFLAGS += -GT
|
||||
ifeq ($(CPU_ARCH),x86)
|
||||
OS_CFLAGS += -G5
|
||||
endif
|
||||
DEFINES += -DWINNT
|
||||
else
|
||||
DEFINES += -DWIN95 -D_PR_GLOBAL_THREADS_ONLY
|
||||
endif
|
||||
|
||||
ifeq ($(CPU_ARCH),x86)
|
||||
DEFINES += -D_X86_
|
||||
else
|
||||
ifeq ($(CPU_ARCH),MIPS)
|
||||
DEFINES += -D_MIPS_
|
||||
else
|
||||
ifeq ($(CPU_ARCH),ALPHA)
|
||||
DEFINES += -D_ALPHA_=1
|
||||
else
|
||||
CPU_ARCH = processor_is_undefined
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Name of the binary code directories
|
||||
|
||||
ifeq ($(CPU_ARCH),x86)
|
||||
CPU_ARCH_TAG =
|
||||
else
|
||||
CPU_ARCH_TAG = $(CPU_ARCH)
|
||||
endif
|
||||
|
||||
ifdef USE_DEBUG_RTL
|
||||
OBJDIR_SUFFIX = OBJD
|
||||
else
|
||||
OBJDIR_SUFFIX = OBJ
|
||||
endif
|
||||
|
||||
OBJDIR_NAME = $(OS_CONFIG)$(CPU_ARCH_TAG)$(OBJDIR_TAG).$(OBJDIR_SUFFIX)
|
||||
|
||||
OS_DLLFLAGS = -nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE
|
||||
@@ -1,42 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for WIN95
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/WIN32.mk
|
||||
@@ -1,42 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Config stuff for WINNT
|
||||
#
|
||||
|
||||
include $(MOD_DEPTH)/config/WIN32.mk
|
||||
@@ -1,299 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#######################################################################
|
||||
# Master "Core Components" macros for getting the OS architecture #
|
||||
#######################################################################
|
||||
|
||||
#
|
||||
# Important internal static macros
|
||||
#
|
||||
|
||||
OS_ARCH := $(subst /,_,$(shell uname -s))
|
||||
OS_RELEASE := $(shell uname -r)
|
||||
OS_TEST := $(shell uname -m)
|
||||
|
||||
#
|
||||
# Tweak the default OS_ARCH and OS_RELEASE macros as needed.
|
||||
#
|
||||
ifeq ($(HAVE_CCONF), 1)
|
||||
ifeq ($(OS_ARCH), Linux)
|
||||
ifeq (2.4,$(findstring 2.4,$(OS_RELEASE)))
|
||||
OS_RELEASE :=2.4
|
||||
endif
|
||||
ifeq (2.2,$(findstring 2.2,$(OS_RELEASE)))
|
||||
OS_RELEASE :=2.2
|
||||
endif
|
||||
ifeq (2.1,$(findstring 2.1,$(OS_RELEASE)))
|
||||
OS_RELEASE :=2.1
|
||||
endif
|
||||
ifeq (2.0,$(findstring 2.0,$(OS_RELEASE)))
|
||||
OS_RELEASE :=2.0
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),AIX)
|
||||
OS_RELEASE := $(shell uname -v).$(shell uname -r)
|
||||
endif
|
||||
ifeq ($(OS_ARCH),BSD_386)
|
||||
OS_ARCH := BSD_OS
|
||||
endif
|
||||
ifeq ($(OS_ARCH),dgux)
|
||||
OS_ARCH := DGUX
|
||||
endif
|
||||
ifeq ($(OS_ARCH),IRIX64)
|
||||
OS_ARCH := IRIX
|
||||
endif
|
||||
ifeq ($(OS_ARCH),UNIX_SV)
|
||||
ifneq ($(findstring NCR,$(shell grep NCR /etc/bcheckrc | head -1 )),)
|
||||
OS_ARCH := NCR
|
||||
else
|
||||
OS_ARCH := UNIXWARE
|
||||
OS_RELEASE := $(shell uname -v)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(OS_ARCH),Mac OS)
|
||||
OS_ARCH := Rhapsody
|
||||
endif
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
OS_ARCH := Rhapsody
|
||||
endif
|
||||
ifeq ($(OS_ARCH),ncr)
|
||||
OS_ARCH := NCR
|
||||
endif
|
||||
# This is the only way to correctly determine the actual OS version on NCR boxes.
|
||||
ifeq ($(OS_ARCH),NCR)
|
||||
OS_RELEASE := $(shell awk '{print $$3}' /etc/.relid | sed 's/^\([0-9]\)\(.\)\(..\)\(.*\)$$/\2.\3/')
|
||||
endif
|
||||
ifeq ($(OS_ARCH),UNIX_System_V)
|
||||
OS_ARCH := NEC
|
||||
endif
|
||||
ifneq (,$(findstring POSIX_for_OpenVMS,$(OS_ARCH)))
|
||||
OS_ARCH := OpenVMS
|
||||
CPU_ARCH := $(shell uname -Wh)
|
||||
OS_RELEASE := $(shell uname -v)
|
||||
endif
|
||||
ifeq ($(OS_ARCH),QNX)
|
||||
ifeq ($(OS_RELEASE),6.00)
|
||||
OS_ARCH := NTO
|
||||
OS_RELEASE := _$(OS_TEST)$(OS_RELEASE)
|
||||
else
|
||||
OS_RELEASE := $(shell uname -v | sed 's/^\([0-9]\)\([0-9]*\)$$/\1.\2/')
|
||||
endif
|
||||
endif
|
||||
ifeq ($(OS_ARCH),SCO_SV)
|
||||
OS_ARCH := SCOOS
|
||||
OS_RELEASE := 5.0
|
||||
endif
|
||||
ifeq ($(OS_ARCH),SINIX-N)
|
||||
OS_ARCH := SINIX
|
||||
endif
|
||||
ifeq ($(OS_ARCH),SINIX-Y)
|
||||
OS_ARCH := SINIX
|
||||
endif
|
||||
ifeq ($(OS_ARCH),SINIX-Z)
|
||||
OS_ARCH := SINIX
|
||||
endif
|
||||
# SINIX changes name to ReliantUNIX with 5.43
|
||||
ifeq ($(OS_ARCH),ReliantUNIX-N)
|
||||
OS_ARCH := SINIX
|
||||
endif
|
||||
ifeq ($(OS_ARCH),UnixWare)
|
||||
OS_ARCH := UNIXWARE
|
||||
OS_RELEASE := $(shell uname -v)
|
||||
endif
|
||||
|
||||
#
|
||||
# Handle FreeBSD 2.2-STABLE and Linux 2.0.30-osfmach3
|
||||
#
|
||||
|
||||
ifeq (,$(filter-out Linux FreeBSD,$(OS_ARCH)))
|
||||
OS_RELEASE := $(shell echo "$(OS_RELEASE)" | sed 's/-.*//')
|
||||
endif
|
||||
|
||||
#
|
||||
# Distinguish between OSF1 V4.0B and V4.0D
|
||||
#
|
||||
|
||||
ifeq ($(OS_ARCH)$(OS_RELEASE),OSF1V4.0)
|
||||
OS_VERSION := $(shell uname -v)
|
||||
ifeq ($(OS_VERSION),564)
|
||||
OS_RELEASE := V4.0B
|
||||
endif
|
||||
ifeq ($(OS_VERSION),878)
|
||||
OS_RELEASE := V4.0D
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Handle uname variants for OS/2.
|
||||
#
|
||||
|
||||
ifeq ($(OS_ARCH),OS_2)
|
||||
OS_ARCH := OS2
|
||||
OS_RELEASE := 4.0
|
||||
endif
|
||||
|
||||
#######################################################################
|
||||
# Master "Core Components" macros for getting the OS target #
|
||||
#######################################################################
|
||||
|
||||
#
|
||||
# Note: OS_TARGET should be specified on the command line for gmake.
|
||||
# When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
|
||||
# The difference between the Win95 target and the WinNT target is that
|
||||
# the WinNT target uses Windows NT specific features not available
|
||||
# in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
|
||||
# at lesser performance (the Win95 target uses threads; the WinNT target
|
||||
# uses fibers).
|
||||
#
|
||||
# When OS_TARGET=WIN16 is specified, then a Windows 3.11 (16bit) target
|
||||
# is built. See: win16_3.11.mk for lots more about the Win16 target.
|
||||
#
|
||||
# If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
|
||||
# cross-compilation.
|
||||
#
|
||||
|
||||
#
|
||||
# The following hack allows one to build on a WIN95 machine (as if
|
||||
# s/he were cross-compiling on a WINNT host for a WIN95 target).
|
||||
# It also accomodates for MKS's uname.exe. If you never intend
|
||||
# to do development on a WIN95 machine, you don't need this hack.
|
||||
#
|
||||
ifeq ($(OS_ARCH),WIN95)
|
||||
OS_ARCH := WINNT
|
||||
OS_TARGET := WIN95
|
||||
endif
|
||||
ifeq ($(OS_ARCH),Windows_95)
|
||||
OS_ARCH := Windows_NT
|
||||
OS_TARGET := WIN95
|
||||
endif
|
||||
ifeq ($(OS_ARCH),CYGWIN_95-4.0)
|
||||
OS_ARCH := CYGWIN_NT-4.0
|
||||
OS_TARGET := WIN95
|
||||
endif
|
||||
ifeq ($(OS_ARCH),OS2)
|
||||
OS_ARCH := OS2
|
||||
OS_TARGET := OS2
|
||||
endif
|
||||
|
||||
#
|
||||
# On WIN32, we also define the variable CPU_ARCH.
|
||||
#
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
ifneq ($(subst /,_,$(shell uname -s)),OS_2)
|
||||
CPU_ARCH := $(shell uname -p)
|
||||
else
|
||||
CPU_ARCH := $(shell uname -m)
|
||||
endif
|
||||
ifeq ($(CPU_ARCH),I386)
|
||||
CPU_ARCH = x86
|
||||
endif
|
||||
else
|
||||
#
|
||||
# If uname -s returns "Windows_NT", we assume that we are using
|
||||
# the uname.exe in MKS toolkit.
|
||||
#
|
||||
# The -r option of MKS uname only returns the major version number.
|
||||
# So we need to use its -v option to get the minor version number.
|
||||
# Moreover, it doesn't have the -p option, so we need to use uname -m.
|
||||
#
|
||||
ifeq ($(OS_ARCH), Windows_NT)
|
||||
OS_ARCH = WINNT
|
||||
OS_MINOR_RELEASE := $(shell uname -v)
|
||||
ifeq ($(OS_MINOR_RELEASE),00)
|
||||
OS_MINOR_RELEASE = 0
|
||||
endif
|
||||
OS_RELEASE := $(OS_RELEASE).$(OS_MINOR_RELEASE)
|
||||
CPU_ARCH := $(shell uname -m)
|
||||
#
|
||||
# MKS's uname -m returns "586" on a Pentium machine.
|
||||
#
|
||||
ifneq (,$(findstring 86,$(CPU_ARCH)))
|
||||
CPU_ARCH = x86
|
||||
endif
|
||||
else
|
||||
#
|
||||
# If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
|
||||
# the uname.exe in the Cygwin tools.
|
||||
#
|
||||
ifeq (CYGWIN_NT,$(findstring CYGWIN_NT,$(OS_ARCH)))
|
||||
OS_RELEASE := $(patsubst CYGWIN_NT-%,%,$(OS_ARCH))
|
||||
OS_ARCH = WINNT
|
||||
CPU_ARCH := $(shell uname -m)
|
||||
#
|
||||
# Cygwin's uname -m returns "i686" on a Pentium Pro machine.
|
||||
#
|
||||
ifneq (,$(findstring 86,$(CPU_ARCH)))
|
||||
CPU_ARCH = x86
|
||||
endif
|
||||
else
|
||||
#
|
||||
# Prior to the Beta 20 release, Cygwin was called GNU-Win32.
|
||||
# If uname -s returns "CYGWIN32/NT", we assume that we are using
|
||||
# the uname.exe in the GNU-Win32 tools.
|
||||
#
|
||||
ifeq ($(OS_ARCH), CYGWIN32_NT)
|
||||
OS_ARCH = WINNT
|
||||
CPU_ARCH := $(shell uname -m)
|
||||
#
|
||||
# GNU-Win32's uname -m returns "i686" on a Pentium Pro machine.
|
||||
#
|
||||
ifneq (,$(findstring 86,$(CPU_ARCH)))
|
||||
CPU_ARCH = x86
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef OS_TARGET
|
||||
OS_TARGET := $(OS_ARCH)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_TARGET), WIN95)
|
||||
OS_RELEASE := 4.0
|
||||
endif
|
||||
|
||||
ifeq ($(OS_TARGET), WIN16)
|
||||
OS_RELEASE :=
|
||||
# OS_RELEASE := _3.11
|
||||
endif
|
||||
|
||||
OS_CONFIG := $(OS_TARGET)$(OS_RELEASE)
|
||||
@@ -1,114 +0,0 @@
|
||||
# -*- Mode: Makefile -*-
|
||||
|
||||
INCLUDED_AUTOCONF_MK = 1
|
||||
USE_AUTOCONF = 1
|
||||
@SHELL_OVERRIDE@
|
||||
MOZILLA_CLIENT = @MOZILLA_CLIENT@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
bindir = @bindir@
|
||||
includedir = @includedir@
|
||||
libdir = @libdir@
|
||||
datadir = @datadir@
|
||||
|
||||
dist_prefix = @dist_prefix@
|
||||
dist_bindir = @dist_bindir@
|
||||
dist_libdir = @dist_libdir@
|
||||
|
||||
DIST = $(dist_prefix)
|
||||
|
||||
OBJDIR_NAME = @OBJDIR_NAME@
|
||||
OBJDIR = @OBJDIR@
|
||||
OBJ_SUFFIX = @OBJ_SUFFIX@
|
||||
LIB_SUFFIX = @LIB_SUFFIX@
|
||||
LIB_PREFIX = @LIB_PREFIX@
|
||||
DLL_SUFFIX = @DLL_SUFFIX@
|
||||
ASM_SUFFIX = @ASM_SUFFIX@
|
||||
PROG_SUFFIX = @PROG_SUFFIX@
|
||||
|
||||
CROSS_COMPILE = @CROSS_COMPILE@
|
||||
BUILD_OPT = @MOZ_OPTIMIZE@
|
||||
|
||||
USE_NSS = @USE_NSS@
|
||||
USE_CPLUS = @USE_CPLUS@
|
||||
USE_IPV6 = @USE_IPV6@
|
||||
USE_N32 = @USE_N32@
|
||||
USE_64 = @USE_64@
|
||||
ENABLE_STRIP = @ENABLE_STRIP@
|
||||
|
||||
USE_PTHREADS = @USE_PTHREADS@
|
||||
USE_BTHREADS = @USE_BTHREADS@
|
||||
PTHREADS_USER = @USE_USER_PTHREADS@
|
||||
CLASSIC_NSPR = @USE_NSPR_THREADS@
|
||||
|
||||
NSPR_CFLAGS = @NSPR_CFLAGS@
|
||||
NSPR_LIBS = @NSPR_LIBS@
|
||||
|
||||
AS = @AS@
|
||||
ASFLAGS = @ASFLAGS@
|
||||
CC = @CC@
|
||||
CCC = @CXX@
|
||||
NS_USE_GCC = @GNU_CC@
|
||||
AR = @AR@
|
||||
AR_FLAGS = @AR_FLAGS@
|
||||
LD = @LD@
|
||||
RANLIB = @RANLIB@
|
||||
PERL = @PERL@
|
||||
WINDRES = @WINDRES@
|
||||
RC = @RC@
|
||||
STRIP = @STRIP@
|
||||
NSINSTALL = @NSINSTALL@
|
||||
FILTER = @FILTER@
|
||||
IMPLIB = @IMPLIB@
|
||||
CYGWIN_WRAPPER = @CYGWIN_WRAPPER@
|
||||
WIN_TOP_SRC = @WIN_TOP_SRC@
|
||||
|
||||
OS_CPPFLAGS = @CPPFLAGS@
|
||||
OS_CFLAGS = $(OS_CPPFLAGS) @CFLAGS@ $(DSO_CFLAGS)
|
||||
OS_CXXFLAGS = $(OS_CPPFLAGS) @CXXFLAGS@ $(DSO_CFLAGS)
|
||||
OS_LIBS = @OS_LIBS@
|
||||
OS_LDFLAGS = @LDFLAGS@
|
||||
OS_DLLFLAGS = @OS_DLLFLAGS@
|
||||
DLLFLAGS = @DLLFLAGS@
|
||||
EXEFLAGS = @EXEFLAGS@
|
||||
OPTIMIZER = @OPTIMIZER@
|
||||
|
||||
MKSHLIB = @MKSHLIB@
|
||||
DSO_CFLAGS = @DSO_CFLAGS@
|
||||
DSO_LDOPTS = @DSO_LDOPTS@
|
||||
|
||||
RESOLVE_LINK_SYMBOLS = @RESOLVE_LINK_SYMBOLS@
|
||||
|
||||
HOST_CC = @HOST_CC@
|
||||
HOST_CFLAGS = @HOST_CFLAGS@
|
||||
|
||||
DEFINES = @DEFINES@ @DEFS@
|
||||
|
||||
CPU_ARCH = @CPU_ARCH@
|
||||
|
||||
OS_TARGET = @OS_TARGET@
|
||||
OS_ARCH = @OS_ARCH@
|
||||
OS_RELEASE = @OS_RELEASE@
|
||||
OS_TEST = @OS_TEST@
|
||||
|
||||
NOSUCHFILE = @NOSUCHFILE@
|
||||
MOZ_OBJFORMAT = @MOZ_OBJFORMAT@
|
||||
ULTRASPARC_LIBRARY = @ULTRASPARC_LIBRARY@
|
||||
ULTRASPARC_FILTER_LIBRARY = @ULTRASPARC_FILTER_LIBRARY@
|
||||
|
||||
OBJECT_MODE = @OBJECT_MODE@
|
||||
ifdef OBJECT_MODE
|
||||
export OBJECT_MODE
|
||||
endif
|
||||
|
||||
# ldap-specific code (up to here, all the code came from
|
||||
# mozilla/nsprpub/config/autoconf.mk.in)
|
||||
#
|
||||
MOZILLA_CLIENT = 1
|
||||
VPATH = $(srcdir)
|
||||
|
||||
NEXT_ROOT = @NEXT_ROOT@
|
||||
ifdef NEXT_ROOT
|
||||
export NEXT_ROOT
|
||||
endif
|
||||
1481
mozilla/directory/c-sdk/config/autoconf/config.guess
vendored
1481
mozilla/directory/c-sdk/config/autoconf/config.guess
vendored
File diff suppressed because it is too large
Load Diff
1595
mozilla/directory/c-sdk/config/autoconf/config.sub
vendored
1595
mozilla/directory/c-sdk/config/autoconf/config.sub
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,119 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5; it is not part of GNU.
|
||||
#
|
||||
# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
#
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
|
||||
instcmd="$mvprog"
|
||||
chmodcmd=""
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dstdir=`dirname $dst`
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd $dst
|
||||
$doit $mvcmd $dsttmp $dst
|
||||
|
||||
|
||||
exit 0
|
||||
@@ -1,67 +0,0 @@
|
||||
# -*- tab-width: 4; -*-
|
||||
# Configure paths for NSPR
|
||||
# Public domain - Chris Seawood <cls@seawood.org> 2001-04-05
|
||||
# Based upon gtk.m4 (also PD) by Owen Taylor
|
||||
|
||||
dnl AM_PATH_NSPR([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl Test for NSPR, and define NSPR_CFLAGS and NSPR_LIBS
|
||||
AC_DEFUN(AM_PATH_NSPR,
|
||||
[dnl
|
||||
|
||||
AC_ARG_WITH(nspr-prefix,
|
||||
[ --with-nspr-prefix=PFX Prefix where NSPR is installed],
|
||||
nspr_config_prefix="$withval",
|
||||
nspr_config_prefix="")
|
||||
|
||||
AC_ARG_WITH(nspr-exec-prefix,
|
||||
[ --with-nspr-exec-prefix=PFX
|
||||
Exec prefix where NSPR is installed],
|
||||
nspr_config_exec_prefix="$withval",
|
||||
nspr_config_exec_prefix="")
|
||||
|
||||
if test -n "$nspr_config_exec_prefix"; then
|
||||
nspr_config_args="$nspr_config_args --exec-prefix=$nspr_config_exec_prefix"
|
||||
if test -z "$NSPR_CONFIG"; then
|
||||
NSPR_CONFIG=$nspr_config_exec_prefix/bin/nspr-config
|
||||
fi
|
||||
fi
|
||||
if test -n "$nspr_config_prefix"; then
|
||||
nspr_config_args="$nspr_config_args --prefix=$nspr_config_prefix"
|
||||
if test -z "$NSPR_CONFIG"; then
|
||||
NSPR_CONFIG=$nspr_config_prefix/bin/nspr-config
|
||||
fi
|
||||
fi
|
||||
|
||||
unset ac_cv_path_NSPR_CONFIG
|
||||
AC_PATH_PROG(NSPR_CONFIG, nspr-config, no)
|
||||
min_nspr_version=ifelse([$1], ,4.0.0,$1)
|
||||
AC_MSG_CHECKING(for NSPR - version >= $min_nspr_version (skipping))
|
||||
|
||||
no_nspr=""
|
||||
if test "$NSPR_CONFIG" = "no"; then
|
||||
no_nspr="yes"
|
||||
else
|
||||
NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags`
|
||||
NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs`
|
||||
|
||||
dnl Skip version check for now
|
||||
nspr_config_major_version=`$NSPR_CONFIG $nspr_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
nspr_config_minor_version=`$NSPR_CONFIG $nspr_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
nspr_config_micro_version=`$NSPR_CONFIG $nspr_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
fi
|
||||
|
||||
if test -z "$no_nspr"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
|
||||
AC_SUBST(NSPR_CFLAGS)
|
||||
AC_SUBST(NSPR_LIBS)
|
||||
|
||||
])
|
||||
@@ -1,246 +0,0 @@
|
||||
#! gmake
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
# Configuration information for building in the NSPR source module
|
||||
|
||||
# Define an include-at-most-once-flag
|
||||
NSPR_CONFIG_MK = 1
|
||||
|
||||
#
|
||||
# The variable definitions in this file are inputs to NSPR's
|
||||
# build system. This file, if present, is included at the
|
||||
# beginning of config.mk.
|
||||
#
|
||||
# For example:
|
||||
#
|
||||
# BUILD_OPT=1
|
||||
# USE_PTHREADS=1
|
||||
# NS_USE_GCC=
|
||||
#
|
||||
ifndef topsrcdir
|
||||
topsrcdir=$(MOD_DEPTH)
|
||||
endif
|
||||
|
||||
ifndef srcdir
|
||||
srcdir=.
|
||||
endif
|
||||
|
||||
ifdef USE_AUTOCONF
|
||||
|
||||
NFSPWD = $(MOD_DEPTH)/config/nfspwd
|
||||
|
||||
CFLAGS = $(CC_ONLY_FLAGS) $(OPTIMIZER) $(OS_CFLAGS)\
|
||||
$(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
|
||||
CCCFLAGS = $(CCC_ONLY_FLAGS) $(OPTIMIZER) $(OS_CFLAGS)\
|
||||
$(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
|
||||
# For purify
|
||||
NOMD_CFLAGS = $(CC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\
|
||||
$(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
|
||||
NOMD_CCFLAGS = $(CCC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\
|
||||
$(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
|
||||
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
ifndef NSDISTMODE
|
||||
NSDISTMODE=absolute_symlink
|
||||
endif
|
||||
PWD := $(shell pwd)
|
||||
endif
|
||||
|
||||
ifeq ($(NSDISTMODE),copy)
|
||||
# copy files, but preserve source mtime
|
||||
INSTALL = $(NSINSTALL) -t
|
||||
else
|
||||
ifeq ($(NSDISTMODE),absolute_symlink)
|
||||
# install using absolute symbolic links
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
INSTALL = $(NSINSTALL) -L $(PWD)
|
||||
else
|
||||
INSTALL = $(NSINSTALL) -L `$(NFSPWD)`
|
||||
endif
|
||||
else
|
||||
# install using relative symbolic links
|
||||
INSTALL = $(NSINSTALL) -R
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef BUILD_DEBUG_GC
|
||||
DEFINES += -DDEBUG_GC
|
||||
endif
|
||||
|
||||
GARBAGE += $(DEPENDENCIES) core $(wildcard core.[0-9]*)
|
||||
|
||||
ifdef USE_AUTOCONF
|
||||
DIST_GARBAGE += Makefile
|
||||
endif
|
||||
|
||||
DEFINES += -DFORCE_PR_LOG
|
||||
|
||||
ifeq ($(_PR_NO_CLOCK_TIMER),1)
|
||||
DEFINES += -D_PR_NO_CLOCK_TIMER
|
||||
endif
|
||||
|
||||
ifeq ($(USE_PTHREADS), 1)
|
||||
DEFINES += -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM
|
||||
endif
|
||||
|
||||
ifeq ($(PTHREADS_USER), 1)
|
||||
DEFINES += -DPTHREADS_USER -UHAVE_CVAR_BUILT_ON_SEM
|
||||
endif
|
||||
|
||||
ifeq ($(USE_IPV6),1)
|
||||
DEFINES += -D_PR_INET6
|
||||
endif
|
||||
|
||||
else # ! USE_AUTOCONF
|
||||
|
||||
ifndef NSPR_MY_CONFIG_MK
|
||||
NSPR_MY_CONFIG_MK = $(MOD_DEPTH)/config/my_config.mk
|
||||
endif
|
||||
|
||||
#
|
||||
# The variable definitions in this file are used to
|
||||
# override variable values set by NSPR's build system.
|
||||
# This file, if present, is included at the end of config.mk.
|
||||
#
|
||||
# For example:
|
||||
#
|
||||
# DIST=/usr/local/nspr
|
||||
#
|
||||
ifndef NSPR_MY_OVERRIDES_MK
|
||||
NSPR_MY_OVERRIDES_MK = $(MOD_DEPTH)/config/my_overrides.mk
|
||||
endif
|
||||
|
||||
-include $(NSPR_MY_CONFIG_MK)
|
||||
|
||||
include $(MOD_DEPTH)/config/module.df
|
||||
|
||||
include $(MOD_DEPTH)/config/arch.mk
|
||||
|
||||
ifndef NSDEPTH
|
||||
NSDEPTH = $(MOD_DEPTH)/..
|
||||
endif
|
||||
|
||||
#
|
||||
# Default command macros; can be overridden in <arch>.mk.
|
||||
#
|
||||
# XXX FIXME: I removed CCF and LINKEXE.
|
||||
AS = $(CC)
|
||||
ASFLAGS = $(CFLAGS)
|
||||
PURIFY = purify $(PURIFYOPTIONS)
|
||||
LINK_DLL = $(LINK) $(OS_DLLFLAGS) $(DLLFLAGS)
|
||||
NFSPWD = $(MOD_DEPTH)/config/nfspwd
|
||||
|
||||
CFLAGS = $(CC_ONLY_FLAGS) $(OPTIMIZER) $(OS_CFLAGS)\
|
||||
$(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
|
||||
CCCFLAGS = $(CCC_ONLY_FLAGS) $(OPTIMIZER) $(OS_CFLAGS)\
|
||||
$(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
|
||||
# For purify
|
||||
NOMD_CFLAGS = $(CC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\
|
||||
$(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
|
||||
|
||||
include $(MOD_DEPTH)/config/$(OS_TARGET).mk
|
||||
|
||||
# Figure out where the binary code lives.
|
||||
BUILD = $(OBJDIR_NAME)
|
||||
OBJDIR = $(OBJDIR_NAME)
|
||||
DIST = $(NSDEPTH)/dist/$(OBJDIR_NAME)
|
||||
ifeq ($(MOZ_BITS),16)
|
||||
MOZ_INCL = $(NSDEPTH)/dist/public/win16
|
||||
MOZ_DIST = $(NSDEPTH)/dist/WIN16D_D.OBJ
|
||||
endif
|
||||
|
||||
VPATH = $(OBJDIR)
|
||||
DEPENDENCIES = $(OBJDIR)/.md
|
||||
|
||||
ifdef BUILD_DEBUG_GC
|
||||
DEFINES += -DDEBUG_GC
|
||||
endif
|
||||
|
||||
GARBAGE += $(DEPENDENCIES) core $(wildcard core.[0-9]*)
|
||||
|
||||
####################################################################
|
||||
#
|
||||
# The NSPR-specific configuration
|
||||
#
|
||||
####################################################################
|
||||
|
||||
OS_CFLAGS += -DFORCE_PR_LOG
|
||||
|
||||
ifeq ($(_PR_NO_CLOCK_TIMER),1)
|
||||
OS_CFLAGS += -D_PR_NO_CLOCK_TIMER
|
||||
endif
|
||||
|
||||
ifeq ($(USE_PTHREADS), 1)
|
||||
OS_CFLAGS += -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM
|
||||
endif
|
||||
|
||||
ifeq ($(PTHREADS_USER), 1)
|
||||
OS_CFLAGS += -DPTHREADS_USER -UHAVE_CVAR_BUILT_ON_SEM
|
||||
endif
|
||||
|
||||
ifeq ($(USE_IPV6),1)
|
||||
OS_CFLAGS += -D_PR_INET6
|
||||
endif
|
||||
|
||||
ifdef GC_LEAK_DETECTOR
|
||||
OS_CFLAGS += -DGC_LEAK_DETECTOR
|
||||
endif
|
||||
|
||||
####################################################################
|
||||
#
|
||||
# Configuration for the release process
|
||||
#
|
||||
####################################################################
|
||||
|
||||
MDIST = /share/builds/components
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
MDIST = //helium/dist
|
||||
MDIST_DOS = $(subst /,\\,$(MDIST))
|
||||
endif
|
||||
|
||||
# RELEASE_DIR is ns/dist/<module name>
|
||||
|
||||
RELEASE_DIR = $(NSDEPTH)/dist/release/$(MOD_NAME)
|
||||
|
||||
RELEASE_INCLUDE_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/include
|
||||
RELEASE_BIN_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/bin
|
||||
RELEASE_LIB_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/lib
|
||||
|
||||
-include $(NSPR_MY_OVERRIDES_MK)
|
||||
|
||||
endif # USE_AUTOCONF
|
||||
@@ -1,75 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Stupid wrapper to avoid win32 dospath/cygdrive issues
|
||||
# Try not to spawn programs from within this file. If the stuff in here looks royally
|
||||
# confusing, see bug: http://bugzilla.mozilla.org/show_bug.cgi?id=206643
|
||||
# and look at the older versions of this file that are easier to read, but
|
||||
# do basically the same thing
|
||||
#
|
||||
|
||||
prog=$1
|
||||
shift
|
||||
if test -z "$prog"; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# If $CYGDRIVE_MOUNT was not set in configure, give $mountpoint the results of mount -p
|
||||
mountpoint=$CYGDRIVE_MOUNT
|
||||
if test -z "$mountpoint"; then
|
||||
mountpoint=`mount -p`
|
||||
if test -z "$mountpoint"; then
|
||||
print "Cannot determine cygwin mount points. Exiting"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Delete everything but "/cygdrive" (or other mountpoint) from mount=`mount -p`
|
||||
mountpoint=${mountpoint#*/}
|
||||
mountpoint=/${mountpoint%%[!A-Za-z0-9_]*}
|
||||
mountpoint=${mountpoint%/}
|
||||
|
||||
args=""
|
||||
up=""
|
||||
if test "${prog}" = "-up"; then
|
||||
up=1
|
||||
prog=${1}
|
||||
shift
|
||||
fi
|
||||
|
||||
process=1
|
||||
|
||||
# Convert the mountpoint in parameters to Win32 filenames
|
||||
# For instance: /cygdrive/c/foo -> c:/foo
|
||||
for i in "${@}"
|
||||
do
|
||||
if test "${i}" = "-wrap"; then
|
||||
process=1
|
||||
else
|
||||
if test "${i}" = "-nowrap"; then
|
||||
process=
|
||||
else
|
||||
if test -n "${process}"; then
|
||||
if test -n "${up}"; then
|
||||
pathname=${i#-I[a-zA-Z]:/}
|
||||
if ! test "${pathname}" = "${i}"; then
|
||||
no_i=${i#-I}
|
||||
driveletter=${no_i%%:*}
|
||||
i=-I${mountpoint}/${driveletter}/${pathname}
|
||||
fi
|
||||
else
|
||||
eval 'leader=${i%%'${mountpoint}'/[a-zA-Z]/*}'
|
||||
if ! test "${leader}" = "${i}"; then
|
||||
eval 'pathname=${i#'${leader}${mountpoint}'/[a-zA-Z]/}'
|
||||
eval 'no_mountpoint=${i#'${leader}${mountpoint}'/}'
|
||||
driveletter=${no_mountpoint%%/*}
|
||||
i=${leader}${driveletter}:/${pathname}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
args="${args} ${i}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
exec $prog $args
|
||||
@@ -1,44 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# Module description file
|
||||
#
|
||||
# A module is also called a component or a subsystem.
|
||||
|
||||
MOD_NAME = nspr20
|
||||
MOD_VERSION = 4
|
||||
@@ -1,50 +0,0 @@
|
||||
#! perl
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
require "fastcwd.pl";
|
||||
|
||||
$_ = &fastcwd;
|
||||
if (m@^/[uh]/@o || s@^/tmp_mnt/@/@o) {
|
||||
print("$_\n");
|
||||
} elsif ((($user, $rest) = m@^/usr/people/(\w+)/(.*)@o)
|
||||
&& readlink("/u/$user") eq "/usr/people/$user") {
|
||||
print("/u/$user/$rest\n");
|
||||
} else {
|
||||
chop($host = `hostname`);
|
||||
print("/h/$host$_\n");
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
#! perl
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
require "fastcwd.pl";
|
||||
|
||||
$_ = &fastcwd;
|
||||
if (m@^/[uh]/@o || s@^/tmp_mnt/@/@o) {
|
||||
print("$_\n");
|
||||
} elsif ((($user, $rest) = m@^/usr/people/(\w+)/(.*)@o)
|
||||
&& readlink("/u/$user") eq "/usr/people/$user") {
|
||||
print("/u/$user/$rest\n");
|
||||
} else {
|
||||
chop($host = `hostname`);
|
||||
print("/h/$host$_\n");
|
||||
}
|
||||
@@ -1,132 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(VMS)
|
||||
#include <sys/timeb.h>
|
||||
#elif defined(XP_UNIX) || defined(XP_OS2_EMX) || defined(XP_BEOS)
|
||||
#include <sys/time.h>
|
||||
#elif defined(WIN32) || defined(XP_OS2_VACPP)
|
||||
#include <sys/timeb.h>
|
||||
#else
|
||||
#error "Architecture not supported"
|
||||
#endif
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
#if defined(OMIT_LIB_BUILD_TIME)
|
||||
/*
|
||||
* Some platforms don't have any 64-bit integer type
|
||||
* such as 'long long'. Because we can't use NSPR's
|
||||
* PR_snprintf in this program, it is difficult to
|
||||
* print a static initializer for PRInt64 (a struct).
|
||||
* So we print nothing. The makefiles that build the
|
||||
* shared libraries will detect the empty output string
|
||||
* of this program and omit the library build time
|
||||
* in PRVersionDescription.
|
||||
*/
|
||||
#elif defined(VMS)
|
||||
long long now;
|
||||
struct timeb b;
|
||||
ftime(&b);
|
||||
now = b.time;
|
||||
now *= 1000000;
|
||||
now += (1000 * b.millitm);
|
||||
fprintf(stdout, "%Ld", now);
|
||||
#elif defined(XP_UNIX) || defined(XP_OS2_EMX) || defined(XP_BEOS)
|
||||
long long now;
|
||||
struct timeval tv;
|
||||
#ifdef HAVE_SVID_GETTOD
|
||||
gettimeofday(&tv);
|
||||
#else
|
||||
gettimeofday(&tv, NULL);
|
||||
#endif
|
||||
now = ((1000000LL) * tv.tv_sec) + (long long)tv.tv_usec;
|
||||
#if defined(OSF1)
|
||||
fprintf(stdout, "%ld", now);
|
||||
#elif defined(BEOS) && defined(__POWERPC__)
|
||||
fprintf(stdout, "%Ld", now); /* Metroworks on BeOS PPC */
|
||||
#else
|
||||
fprintf(stdout, "%lld", now);
|
||||
#endif
|
||||
|
||||
#elif defined(WIN32)
|
||||
__int64 now;
|
||||
struct timeb b;
|
||||
ftime(&b);
|
||||
now = b.time;
|
||||
now *= 1000000;
|
||||
now += (1000 * b.millitm);
|
||||
fprintf(stdout, "%I64d", now);
|
||||
|
||||
#elif defined(XP_OS2_VACPP)
|
||||
/* no long long or i64 so we use a string */
|
||||
#include <string.h>
|
||||
char buf[24];
|
||||
char tbuf[7];
|
||||
time_t now;
|
||||
long mtime;
|
||||
int i;
|
||||
|
||||
struct timeb b;
|
||||
ftime(&b);
|
||||
now = b.time;
|
||||
_ltoa(now, buf, 10);
|
||||
|
||||
mtime = b.millitm * 1000;
|
||||
if (mtime == 0){
|
||||
++now;
|
||||
strcat(buf, "000000");
|
||||
} else {
|
||||
_ltoa(mtime, tbuf, 10);
|
||||
for (i = strlen(tbuf); i < 6; ++i)
|
||||
strcat(buf, "0");
|
||||
strcat(buf, tbuf);
|
||||
}
|
||||
fprintf(stdout, "%s", buf);
|
||||
|
||||
#else
|
||||
#error "Architecture not supported"
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
} /* main */
|
||||
|
||||
/* now.c */
|
||||
@@ -1,597 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
** Netscape portable install command.
|
||||
**
|
||||
** Brendan Eich, 7/20/95
|
||||
*/
|
||||
#include <stdio.h> /* OSF/1 requires this before grp.h, so put it first */
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <grp.h>
|
||||
#include <pwd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <utime.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
#ifdef USE_REENTRANT_LIBC
|
||||
#include "libc_r.h"
|
||||
#endif /* USE_REENTRANT_LIBC */
|
||||
|
||||
#include "pathsub.h"
|
||||
|
||||
#ifndef HAVE_LCHOWN
|
||||
#define HAVE_LCHOWN
|
||||
#endif
|
||||
|
||||
#if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) \
|
||||
|| defined(SUNOS4) || defined(SCO) || defined(UNIXWARE) \
|
||||
|| defined(RHAPSODY) || defined(NEXTSTEP) || defined(QNX) \
|
||||
|| defined(BEOS) || defined(VMS) || defined(DARWIN)
|
||||
#undef HAVE_LCHOWN
|
||||
#endif
|
||||
|
||||
#define HAVE_FCHMOD
|
||||
|
||||
#if defined(BEOS)
|
||||
#undef HAVE_FCHMOD
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Does getcwd() take NULL as the first argument and malloc
|
||||
* the result buffer?
|
||||
*/
|
||||
#if !defined(RHAPSODY) && !defined(NEXTSTEP) && !defined(VMS)
|
||||
#define GETCWD_CAN_MALLOC
|
||||
#endif
|
||||
|
||||
#ifdef NEXTSTEP
|
||||
#include <bsd/libc.h>
|
||||
|
||||
/*
|
||||
** balazs.pataki@sztaki.hu: The getcwd is broken in NEXTSTEP (returns 0),
|
||||
** when called on a mounted fs. Did anyone notice this? Here's an ugly
|
||||
** workaround ...
|
||||
*/
|
||||
#define getcwd(b,s) my_getcwd(b,s)
|
||||
|
||||
static char *
|
||||
my_getcwd (char *buf, size_t size)
|
||||
{
|
||||
FILE *pwd = popen("pwd", "r");
|
||||
char *result = fgets(buf, size, pwd);
|
||||
|
||||
if (result) {
|
||||
buf[strlen(buf)-1] = '\0';
|
||||
}
|
||||
pclose (pwd);
|
||||
return buf;
|
||||
}
|
||||
#endif /* NEXTSTEP */
|
||||
|
||||
#ifdef LINUX
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
#if defined(SCO) || defined(UNIXWARE) || defined(SNI) || defined(NCR) || defined(NEC) || defined(NEXTSTEP)
|
||||
#if !defined(S_ISLNK) && defined(S_IFLNK)
|
||||
#define S_ISLNK(a) (((a) & S_IFMT) == S_IFLNK)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(SNI)
|
||||
extern int fchmod(int fildes, mode_t mode);
|
||||
#endif
|
||||
|
||||
#ifdef QNX
|
||||
#define d_ino d_stat.st_ino
|
||||
#endif
|
||||
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"usage: %s [-C cwd] [-L linkprefix] [-m mode] [-o owner] [-g group]\n"
|
||||
" %*s [-DdltR] file [file ...] directory\n",
|
||||
program, (int)strlen(program), "");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
static int
|
||||
mkdirs(char *path, mode_t mode)
|
||||
{
|
||||
char *cp;
|
||||
struct stat sb;
|
||||
int res;
|
||||
|
||||
while (*path == '/' && path[1] == '/')
|
||||
path++;
|
||||
while ((cp = strrchr(path, '/')) && cp[1] == '\0')
|
||||
*cp = '\0';
|
||||
if (cp && cp != path) {
|
||||
*cp = '\0';
|
||||
if ((stat(path, &sb) < 0 || !S_ISDIR(sb.st_mode)) &&
|
||||
mkdirs(path, mode) < 0) {
|
||||
return -1;
|
||||
}
|
||||
*cp = '/';
|
||||
}
|
||||
res = mkdir(path, mode);
|
||||
if ((res != 0) && (errno == EEXIST))
|
||||
return 0;
|
||||
else
|
||||
return res;
|
||||
}
|
||||
|
||||
static uid_t
|
||||
touid(char *owner)
|
||||
{
|
||||
struct passwd *pw;
|
||||
uid_t uid;
|
||||
char *cp;
|
||||
|
||||
pw = getpwnam(owner);
|
||||
if (pw)
|
||||
return pw->pw_uid;
|
||||
uid = strtol(owner, &cp, 0);
|
||||
if (uid == 0 && cp == owner)
|
||||
fail("cannot find uid for %s", owner);
|
||||
return uid;
|
||||
}
|
||||
|
||||
static gid_t
|
||||
togid(char *group)
|
||||
{
|
||||
struct group *gr;
|
||||
gid_t gid;
|
||||
char *cp;
|
||||
|
||||
gr = getgrnam(group);
|
||||
if (gr)
|
||||
return gr->gr_gid;
|
||||
gid = strtol(group, &cp, 0);
|
||||
if (gid == 0 && cp == group)
|
||||
fail("cannot find gid for %s", group);
|
||||
return gid;
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int onlydir, dodir, dolink, dorelsymlink, dotimes, opt, len, lplen, tdlen, bnlen, exists, fromfd, tofd, cc, wc;
|
||||
mode_t mode = 0755;
|
||||
char *linkprefix, *owner, *group, *cp, *cwd, *todir, *toname, *name, *base, *linkname, *bp, buf[BUFSIZ];
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
struct stat sb, tosb;
|
||||
struct utimbuf utb;
|
||||
|
||||
program = argv[0];
|
||||
cwd = linkname = linkprefix = owner = group = 0;
|
||||
onlydir = dodir = dolink = dorelsymlink = dotimes = lplen = 0;
|
||||
|
||||
while ((opt = getopt(argc, argv, "C:DdlL:Rm:o:g:t")) != EOF) {
|
||||
switch (opt) {
|
||||
case 'C':
|
||||
cwd = optarg;
|
||||
break;
|
||||
case 'D':
|
||||
onlydir = 1;
|
||||
break;
|
||||
case 'd':
|
||||
dodir = 1;
|
||||
break;
|
||||
case 'l':
|
||||
dolink = 1;
|
||||
break;
|
||||
case 'L':
|
||||
linkprefix = optarg;
|
||||
lplen = strlen(linkprefix);
|
||||
dolink = 1;
|
||||
break;
|
||||
case 'R':
|
||||
dolink = dorelsymlink = 1;
|
||||
break;
|
||||
case 'm':
|
||||
mode = strtoul(optarg, &cp, 8);
|
||||
if (mode == 0 && cp == optarg)
|
||||
usage();
|
||||
break;
|
||||
case 'o':
|
||||
owner = optarg;
|
||||
break;
|
||||
case 'g':
|
||||
group = optarg;
|
||||
break;
|
||||
case 't':
|
||||
dotimes = 1;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
if (argc < 2 - onlydir)
|
||||
usage();
|
||||
|
||||
todir = argv[argc-1];
|
||||
if ((stat(todir, &sb) < 0 || !S_ISDIR(sb.st_mode)) &&
|
||||
mkdirs(todir, 0777) < 0) {
|
||||
fail("cannot make directory %s", todir);
|
||||
}
|
||||
if (onlydir)
|
||||
return 0;
|
||||
|
||||
if (!cwd) {
|
||||
#ifdef GETCWD_CAN_MALLOC
|
||||
cwd = getcwd(0, PATH_MAX);
|
||||
#else
|
||||
cwd = malloc(PATH_MAX + 1);
|
||||
cwd = getcwd(cwd, PATH_MAX);
|
||||
#endif
|
||||
}
|
||||
xchdir(todir);
|
||||
#ifdef GETCWD_CAN_MALLOC
|
||||
todir = getcwd(0, PATH_MAX);
|
||||
#else
|
||||
todir = malloc(PATH_MAX + 1);
|
||||
todir = getcwd(todir, PATH_MAX);
|
||||
#endif
|
||||
tdlen = strlen(todir);
|
||||
xchdir(cwd);
|
||||
tdlen = strlen(todir);
|
||||
|
||||
uid = owner ? touid(owner) : -1;
|
||||
gid = group ? togid(group) : -1;
|
||||
|
||||
while (--argc > 0) {
|
||||
name = *argv++;
|
||||
len = strlen(name);
|
||||
base = xbasename(name);
|
||||
bnlen = strlen(base);
|
||||
toname = (char*)xmalloc(tdlen + 1 + bnlen + 1);
|
||||
sprintf(toname, "%s/%s", todir, base);
|
||||
exists = (lstat(toname, &tosb) == 0);
|
||||
|
||||
if (dodir) {
|
||||
/* -d means create a directory, always */
|
||||
if (exists && !S_ISDIR(tosb.st_mode)) {
|
||||
(void) unlink(toname);
|
||||
exists = 0;
|
||||
}
|
||||
if (!exists && mkdir(toname, mode) < 0)
|
||||
fail("cannot make directory %s", toname);
|
||||
if ((owner || group) && chown(toname, uid, gid) < 0)
|
||||
fail("cannot change owner of %s", toname);
|
||||
} else if (dolink) {
|
||||
if (*name == '/') {
|
||||
/* source is absolute pathname, link to it directly */
|
||||
linkname = 0;
|
||||
} else {
|
||||
if (linkprefix) {
|
||||
/* -L implies -l and prefixes names with a $cwd arg. */
|
||||
len += lplen + 1;
|
||||
linkname = (char*)xmalloc(len + 1);
|
||||
sprintf(linkname, "%s/%s", linkprefix, name);
|
||||
} else if (dorelsymlink) {
|
||||
/* Symlink the relative path from todir to source name. */
|
||||
linkname = (char*)xmalloc(PATH_MAX);
|
||||
|
||||
if (*todir == '/') {
|
||||
/* todir is absolute: skip over common prefix. */
|
||||
lplen = relatepaths(todir, cwd, linkname);
|
||||
strcpy(linkname + lplen, name);
|
||||
} else {
|
||||
/* todir is named by a relative path: reverse it. */
|
||||
reversepath(todir, name, len, linkname);
|
||||
xchdir(cwd);
|
||||
}
|
||||
|
||||
len = strlen(linkname);
|
||||
}
|
||||
name = linkname;
|
||||
}
|
||||
|
||||
/* 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)) {
|
||||
(void) (S_ISDIR(tosb.st_mode) ? rmdir : unlink)(toname);
|
||||
exists = 0;
|
||||
}
|
||||
if (!exists && symlink(name, toname) < 0)
|
||||
fail("cannot make symbolic link %s", toname);
|
||||
#ifdef HAVE_LCHOWN
|
||||
if ((owner || group) && lchown(toname, uid, gid) < 0)
|
||||
fail("cannot change owner of %s", toname);
|
||||
#endif
|
||||
|
||||
if (linkname) {
|
||||
free(linkname);
|
||||
linkname = 0;
|
||||
}
|
||||
} else {
|
||||
/* Copy from name to toname, which might be the same file. */
|
||||
fromfd = open(name, O_RDONLY);
|
||||
if (fromfd < 0 || fstat(fromfd, &sb) < 0)
|
||||
fail("cannot access %s", name);
|
||||
if (exists && (!S_ISREG(tosb.st_mode) || access(toname, W_OK) < 0))
|
||||
(void) (S_ISDIR(tosb.st_mode) ? rmdir : unlink)(toname);
|
||||
tofd = open(toname, O_CREAT | O_WRONLY, 0666);
|
||||
if (tofd < 0)
|
||||
fail("cannot create %s", toname);
|
||||
|
||||
bp = buf;
|
||||
while ((cc = read(fromfd, bp, sizeof buf)) > 0) {
|
||||
while ((wc = write(tofd, bp, cc)) > 0) {
|
||||
if ((cc -= wc) == 0)
|
||||
break;
|
||||
bp += wc;
|
||||
}
|
||||
if (wc < 0)
|
||||
fail("cannot write to %s", toname);
|
||||
}
|
||||
if (cc < 0)
|
||||
fail("cannot read from %s", name);
|
||||
|
||||
if (ftruncate(tofd, sb.st_size) < 0)
|
||||
fail("cannot truncate %s", toname);
|
||||
if (dotimes) {
|
||||
utb.actime = sb.st_atime;
|
||||
utb.modtime = sb.st_mtime;
|
||||
if (utime(toname, &utb) < 0)
|
||||
fail("cannot set times of %s", toname);
|
||||
}
|
||||
#ifdef HAVE_FCHMOD
|
||||
if (fchmod(tofd, mode) < 0)
|
||||
#else
|
||||
if (chmod(toname, mode) < 0)
|
||||
#endif
|
||||
fail("cannot change mode of %s", toname);
|
||||
if ((owner || group) && fchown(tofd, uid, gid) < 0)
|
||||
fail("cannot change owner of %s", toname);
|
||||
|
||||
/* Must check for delayed (NFS) write errors on close. */
|
||||
if (close(tofd) < 0)
|
||||
fail("cannot write to %s", toname);
|
||||
close(fromfd);
|
||||
}
|
||||
|
||||
free(toname);
|
||||
}
|
||||
|
||||
free(cwd);
|
||||
free(todir);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
** Pathname subroutines.
|
||||
**
|
||||
** Brendan Eich, 8/29/95
|
||||
*/
|
||||
|
||||
char *program;
|
||||
|
||||
void
|
||||
fail(char *format, ...)
|
||||
{
|
||||
int error;
|
||||
va_list ap;
|
||||
|
||||
#ifdef USE_REENTRANT_LIBC
|
||||
R_STRERROR_INIT_R();
|
||||
#endif
|
||||
|
||||
error = errno;
|
||||
fprintf(stderr, "%s: ", program);
|
||||
va_start(ap, format);
|
||||
vfprintf(stderr, format, ap);
|
||||
va_end(ap);
|
||||
if (error)
|
||||
|
||||
#ifdef USE_REENTRANT_LIBC
|
||||
R_STRERROR_R(errno);
|
||||
fprintf(stderr, ": %s", r_strerror_r);
|
||||
#else
|
||||
fprintf(stderr, ": %s", strerror(errno));
|
||||
#endif
|
||||
|
||||
putc('\n', stderr);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
char *
|
||||
getcomponent(char *path, char *name)
|
||||
{
|
||||
if (*path == '\0')
|
||||
return 0;
|
||||
if (*path == '/') {
|
||||
*name++ = '/';
|
||||
} else {
|
||||
do {
|
||||
*name++ = *path++;
|
||||
} while (*path != '/' && *path != '\0');
|
||||
}
|
||||
*name = '\0';
|
||||
while (*path == '/')
|
||||
path++;
|
||||
return path;
|
||||
}
|
||||
|
||||
#ifdef UNIXWARE_READDIR_BUFFER_TOO_SMALL
|
||||
/* Sigh. The static buffer in Unixware's readdir is too small. */
|
||||
struct dirent * readdir(DIR *d)
|
||||
{
|
||||
static struct dirent *buf = NULL;
|
||||
#define MAX_PATH_LEN 1024
|
||||
|
||||
|
||||
if(buf == NULL)
|
||||
buf = (struct dirent *) malloc(sizeof(struct dirent) + MAX_PATH_LEN)
|
||||
;
|
||||
return(readdir_r(d, buf));
|
||||
}
|
||||
#endif
|
||||
|
||||
char *
|
||||
ino2name(ino_t ino, char *dir)
|
||||
{
|
||||
DIR *dp;
|
||||
struct dirent *ep;
|
||||
char *name;
|
||||
|
||||
dp = opendir("..");
|
||||
if (!dp)
|
||||
fail("cannot read parent directory");
|
||||
for (;;) {
|
||||
if (!(ep = readdir(dp)))
|
||||
fail("cannot find current directory");
|
||||
if (ep->d_ino == ino)
|
||||
break;
|
||||
}
|
||||
name = xstrdup(ep->d_name);
|
||||
closedir(dp);
|
||||
return name;
|
||||
}
|
||||
|
||||
void *
|
||||
xmalloc(size_t size)
|
||||
{
|
||||
void *p = malloc(size);
|
||||
if (!p)
|
||||
fail("cannot allocate %u bytes", size);
|
||||
return p;
|
||||
}
|
||||
|
||||
char *
|
||||
xstrdup(char *s)
|
||||
{
|
||||
return strcpy((char*)xmalloc(strlen(s) + 1), s);
|
||||
}
|
||||
|
||||
char *
|
||||
xbasename(char *path)
|
||||
{
|
||||
char *cp;
|
||||
|
||||
while ((cp = strrchr(path, '/')) && cp[1] == '\0')
|
||||
*cp = '\0';
|
||||
if (!cp) return path;
|
||||
return cp + 1;
|
||||
}
|
||||
|
||||
void
|
||||
xchdir(char *dir)
|
||||
{
|
||||
if (chdir(dir) < 0)
|
||||
fail("cannot change directory to %s", dir);
|
||||
}
|
||||
|
||||
int
|
||||
relatepaths(char *from, char *to, char *outpath)
|
||||
{
|
||||
char *cp, *cp2;
|
||||
int len;
|
||||
char buf[NAME_MAX];
|
||||
|
||||
assert(*from == '/' && *to == '/');
|
||||
for (cp = to, cp2 = from; *cp == *cp2; cp++, cp2++)
|
||||
if (*cp == '\0')
|
||||
break;
|
||||
while (cp[-1] != '/')
|
||||
cp--, cp2--;
|
||||
if (cp - 1 == to) {
|
||||
/* closest common ancestor is /, so use full pathname */
|
||||
len = strlen(strcpy(outpath, to));
|
||||
if (outpath[len] != '/') {
|
||||
outpath[len++] = '/';
|
||||
outpath[len] = '\0';
|
||||
}
|
||||
} else {
|
||||
len = 0;
|
||||
while ((cp2 = getcomponent(cp2, buf)) != 0) {
|
||||
strcpy(outpath + len, "../");
|
||||
len += 3;
|
||||
}
|
||||
while ((cp = getcomponent(cp, buf)) != 0) {
|
||||
sprintf(outpath + len, "%s/", buf);
|
||||
len += strlen(outpath + len);
|
||||
}
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
void
|
||||
reversepath(char *inpath, char *name, int len, char *outpath)
|
||||
{
|
||||
char *cp, *cp2;
|
||||
char buf[NAME_MAX];
|
||||
struct stat sb;
|
||||
|
||||
cp = strcpy(outpath + PATH_MAX - (len + 1), name);
|
||||
cp2 = inpath;
|
||||
while ((cp2 = getcomponent(cp2, buf)) != 0) {
|
||||
if (strcmp(buf, ".") == 0)
|
||||
continue;
|
||||
if (strcmp(buf, "..") == 0) {
|
||||
if (stat(".", &sb) < 0)
|
||||
fail("cannot stat current directory");
|
||||
name = ino2name(sb.st_ino, "..");
|
||||
len = strlen(name);
|
||||
cp -= len + 1;
|
||||
strcpy(cp, name);
|
||||
cp[len] = '/';
|
||||
free(name);
|
||||
xchdir("..");
|
||||
} else {
|
||||
cp -= 3;
|
||||
strncpy(cp, "../", 3);
|
||||
xchdir(buf);
|
||||
}
|
||||
}
|
||||
strcpy(outpath, cp);
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef pathsub_h___
|
||||
#define pathsub_h___
|
||||
/*
|
||||
** Pathname subroutines.
|
||||
**
|
||||
** Brendan Eich, 8/29/95
|
||||
*/
|
||||
#include <limits.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#if SUNOS4
|
||||
#include "../pr/include/md/sunos4.h"
|
||||
#endif
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 1024
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Just prevent stupidity
|
||||
*/
|
||||
#undef NAME_MAX
|
||||
#define NAME_MAX 256
|
||||
|
||||
extern char *program;
|
||||
|
||||
extern void fail(char *format, ...);
|
||||
extern char *getcomponent(char *path, char *name);
|
||||
extern char *ino2name(ino_t ino, char *dir);
|
||||
extern void *xmalloc(size_t size);
|
||||
extern char *xstrdup(char *s);
|
||||
extern char *xbasename(char *path);
|
||||
extern void xchdir(char *dir);
|
||||
|
||||
/* Relate absolute pathnames from and to returning the result in outpath. */
|
||||
extern int relatepaths(char *from, char *to, char *outpath);
|
||||
|
||||
/* XXX changes current working directory -- caveat emptor */
|
||||
extern void reversepath(char *inpath, char *name, int len, char *outpath);
|
||||
|
||||
#endif /* pathsub_h___ */
|
||||
@@ -1,45 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2000
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
* A dummy header file that is a dependency for all the object files.
|
||||
* Used to force a full recompilation of NSPR in Mozilla's Tinderbox
|
||||
* depend builds. See comments in rules.mk.
|
||||
*/
|
||||
|
||||
#error "Do not include this header file."
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
REM
|
||||
REM ***** BEGIN LICENSE BLOCK *****
|
||||
REM Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
REM
|
||||
REM The contents of this file are subject to the Mozilla Public License Version
|
||||
REM 1.1 (the "License"); you may not use this file except in compliance with
|
||||
REM the License. You may obtain a copy of the License at
|
||||
REM http://www.mozilla.org/MPL/
|
||||
REM
|
||||
REM Software distributed under the License is distributed on an "AS IS" basis,
|
||||
REM WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
REM for the specific language governing rights and limitations under the
|
||||
REM License.
|
||||
REM
|
||||
REM The Original Code is mozilla.org Code.
|
||||
REM
|
||||
REM The Initial Developer of the Original Code is
|
||||
REM Netscape Communications Corporation.
|
||||
REM Portions created by the Initial Developer are Copyright (C) 1998
|
||||
REM the Initial Developer. All Rights Reserved.
|
||||
REM
|
||||
REM Contributor(s):
|
||||
REM
|
||||
REM Alternatively, the contents of this file may be used under the terms of
|
||||
REM either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
REM the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
REM in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
REM of those above. If you wish to allow use of your version of this file only
|
||||
REM under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
REM use your version of this file under the terms of the MPL, indicate your
|
||||
REM decision by deleting the provisions above and replace them with the notice
|
||||
REM and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
REM the provisions above, a recipient may use your version of this file under
|
||||
REM the terms of any one of the MPL, the GPL or the LGPL.
|
||||
REM
|
||||
REM ***** END LICENSE BLOCK *****
|
||||
|
||||
mkdir %1
|
||||
@@ -1,495 +0,0 @@
|
||||
#! gmake
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
################################################################################
|
||||
# We have a 4 pass build process:
|
||||
#
|
||||
# Pass 1. export - Create generated headers and stubs. Publish public headers to
|
||||
# dist/<arch>/include.
|
||||
#
|
||||
# Pass 2. libs - Create libraries. Publish libraries to dist/<arch>/lib.
|
||||
#
|
||||
# Pass 3. all - Create programs.
|
||||
#
|
||||
# Pass 4. install - Publish programs to dist/<arch>/bin.
|
||||
#
|
||||
# Parameters to this makefile (set these before including):
|
||||
#
|
||||
# a)
|
||||
# TARGETS -- the target to create
|
||||
# (defaults to $LIBRARY $PROGRAM)
|
||||
# b)
|
||||
# DIRS -- subdirectories for make to recurse on
|
||||
# (the 'all' rule builds $TARGETS $DIRS)
|
||||
# c)
|
||||
# CSRCS -- .c files to compile
|
||||
# (used to define $OBJS)
|
||||
# d)
|
||||
# PROGRAM -- the target program name to create from $OBJS
|
||||
# ($OBJDIR automatically prepended to it)
|
||||
# e)
|
||||
# LIBRARY -- the target library name to create from $OBJS
|
||||
# ($OBJDIR automatically prepended to it)
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ifndef topsrcdir
|
||||
topsrcdir=$(MOD_DEPTH)
|
||||
endif
|
||||
|
||||
ifndef srcdir
|
||||
srcdir=.
|
||||
endif
|
||||
|
||||
ifndef NSPR_CONFIG_MK
|
||||
include $(topsrcdir)/config/config.mk
|
||||
endif
|
||||
|
||||
ifdef USE_AUTOCONF
|
||||
ifdef CROSS_COMPILE
|
||||
ifdef INTERNAL_TOOLS
|
||||
CC=$(HOST_CC)
|
||||
CCC=$(HOST_CXX)
|
||||
CFLAGS=$(HOST_CFLAGS)
|
||||
CXXFLAGS=$(HOST_CXXFLAGS)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# This makefile contains rules for building the following kinds of
|
||||
# libraries:
|
||||
# - LIBRARY: a static (archival) library
|
||||
# - SHARED_LIBRARY: a shared (dynamic link) library
|
||||
# - IMPORT_LIBRARY: an import library, used only on Windows and OS/2
|
||||
#
|
||||
# The names of these libraries can be generated by simply specifying
|
||||
# LIBRARY_NAME and LIBRARY_VERSION.
|
||||
#
|
||||
|
||||
ifdef LIBRARY_NAME
|
||||
ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)))
|
||||
|
||||
#
|
||||
# Win95, Win16, and OS/2 require library names conforming to the 8.3 rule.
|
||||
# other platforms do not.
|
||||
#
|
||||
ifeq (,$(filter-out WIN95 WIN16 OS2,$(OS_TARGET)))
|
||||
LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
|
||||
SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
|
||||
IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
|
||||
else
|
||||
LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
|
||||
SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
|
||||
IMPORT_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),OS2)
|
||||
DEF_FILE := $(SHARED_LIBRARY:.dll=.def)
|
||||
endif
|
||||
|
||||
else
|
||||
|
||||
LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
|
||||
ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
|
||||
SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_shr.a
|
||||
else
|
||||
ifdef MKSHLIB
|
||||
SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
|
||||
endif
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef TARGETS
|
||||
ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)))
|
||||
TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY)
|
||||
else
|
||||
TARGETS = $(LIBRARY) $(SHARED_LIBRARY)
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# OBJS is the list of object files. It can be constructed by
|
||||
# specifying CSRCS (list of C source files) and ASFILES (list
|
||||
# of assembly language source files).
|
||||
#
|
||||
|
||||
ifndef OBJS
|
||||
OBJS = $(addprefix $(OBJDIR)/,$(CSRCS:.c=.$(OBJ_SUFFIX))) \
|
||||
$(addprefix $(OBJDIR)/,$(ASFILES:.$(ASM_SUFFIX)=.$(OBJ_SUFFIX)))
|
||||
endif
|
||||
|
||||
ifeq ($(OS_TARGET), WIN16)
|
||||
comma := ,
|
||||
empty :=
|
||||
space := $(empty) $(empty)
|
||||
W16OBJS = $(subst $(space),$(comma)$(space),$(strip $(OBJS)))
|
||||
W16TEMP =$(OS_LIBS) $(EXTRA_LIBS)
|
||||
ifeq ($(strip $(W16TEMP)),)
|
||||
W16LIBS =
|
||||
else
|
||||
W16LIBS = library $(subst $(space),$(comma)$(space),$(strip $(W16TEMP)))
|
||||
endif
|
||||
W16DEF = $(notdir $(basename $(SHARED_LIBRARY))).DEF
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
ifneq ($(OS_TARGET), WIN16)
|
||||
OBJS += $(RES)
|
||||
endif
|
||||
endif
|
||||
|
||||
ALL_TRASH = $(TARGETS) $(OBJS) $(filter-out . .., $(OBJDIR)) LOGS TAGS $(GARBAGE) \
|
||||
$(NOSUCHFILE) $(DEF_FILE)\
|
||||
so_locations
|
||||
|
||||
ifdef DIRS
|
||||
LOOP_OVER_DIRS = \
|
||||
@for d in $(DIRS); do \
|
||||
if test -d $$d; then \
|
||||
set -e; \
|
||||
echo "cd $$d; $(MAKE) $@"; \
|
||||
$(MAKE) -C $$d $@; \
|
||||
set +e; \
|
||||
else \
|
||||
echo "Skipping non-directory $$d..."; \
|
||||
fi; \
|
||||
done
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
all:: export
|
||||
|
||||
export::
|
||||
+$(LOOP_OVER_DIRS)
|
||||
|
||||
libs:: export
|
||||
|
||||
install:: export
|
||||
|
||||
clean::
|
||||
rm -rf $(OBJS) so_locations $(NOSUCHFILE) $(GARBAGE)
|
||||
+$(LOOP_OVER_DIRS)
|
||||
|
||||
clobber::
|
||||
rm -rf $(OBJS) $(TARGETS) $(filter-out . ..,$(OBJDIR)) $(GARBAGE) so_locations $(NOSUCHFILE)
|
||||
+$(LOOP_OVER_DIRS)
|
||||
|
||||
realclean clobber_all::
|
||||
rm -rf $(wildcard *.OBJ *.OBJD) dist $(ALL_TRASH)
|
||||
+$(LOOP_OVER_DIRS)
|
||||
|
||||
distclean::
|
||||
rm -rf $(wildcard *.OBJ *.OBJD) dist $(ALL_TRASH) $(DIST_GARBAGE)
|
||||
+$(LOOP_OVER_DIRS)
|
||||
|
||||
real_install:: $(RELEASE_BINS) $(RELEASE_HEADERS) $(RELEASE_LIBS)
|
||||
ifdef RELEASE_BINS
|
||||
$(NSINSTALL) -t -m 0755 $(RELEASE_BINS) $(DESTDIR)$(bindir)
|
||||
endif
|
||||
ifdef RELEASE_HEADERS
|
||||
$(NSINSTALL) -t -m 0644 $(RELEASE_HEADERS) $(DESTDIR)$(includedir)
|
||||
endif
|
||||
ifdef RELEASE_LIBS
|
||||
$(NSINSTALL) -t -m 0755 $(RELEASE_LIBS) $(DESTDIR)$(libdir)
|
||||
endif
|
||||
+$(LOOP_OVER_DIRS)
|
||||
|
||||
release:: export
|
||||
ifdef RELEASE_BINS
|
||||
@echo "Copying executable programs and scripts to release directory"
|
||||
@if test -z "$(BUILD_NUMBER)"; then \
|
||||
echo "BUILD_NUMBER must be defined"; \
|
||||
false; \
|
||||
else \
|
||||
true; \
|
||||
fi
|
||||
@if test ! -d $(RELEASE_BIN_DIR); then \
|
||||
rm -rf $(RELEASE_BIN_DIR); \
|
||||
$(NSINSTALL) -D $(RELEASE_BIN_DIR);\
|
||||
else \
|
||||
true; \
|
||||
fi
|
||||
cp $(RELEASE_BINS) $(RELEASE_BIN_DIR)
|
||||
endif
|
||||
ifdef RELEASE_LIBS
|
||||
@echo "Copying libraries to release directory"
|
||||
@if test -z "$(BUILD_NUMBER)"; then \
|
||||
echo "BUILD_NUMBER must be defined"; \
|
||||
false; \
|
||||
else \
|
||||
true; \
|
||||
fi
|
||||
@if test ! -d $(RELEASE_LIB_DIR); then \
|
||||
rm -rf $(RELEASE_LIB_DIR); \
|
||||
$(NSINSTALL) -D $(RELEASE_LIB_DIR);\
|
||||
else \
|
||||
true; \
|
||||
fi
|
||||
cp $(RELEASE_LIBS) $(RELEASE_LIB_DIR)
|
||||
endif
|
||||
ifdef RELEASE_HEADERS
|
||||
@echo "Copying header files to release directory"
|
||||
@if test -z "$(BUILD_NUMBER)"; then \
|
||||
echo "BUILD_NUMBER must be defined"; \
|
||||
false; \
|
||||
else \
|
||||
true; \
|
||||
fi
|
||||
@if test ! -d $(RELEASE_HEADERS_DEST); then \
|
||||
rm -rf $(RELEASE_HEADERS_DEST); \
|
||||
$(NSINSTALL) -D $(RELEASE_HEADERS_DEST);\
|
||||
else \
|
||||
true; \
|
||||
fi
|
||||
cp $(RELEASE_HEADERS) $(RELEASE_HEADERS_DEST)
|
||||
endif
|
||||
+$(LOOP_OVER_DIRS)
|
||||
|
||||
alltags:
|
||||
rm -f TAGS tags
|
||||
find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs etags -a
|
||||
find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs ctags -a
|
||||
|
||||
$(NFSPWD):
|
||||
cd $(@D); $(MAKE) $(@F)
|
||||
|
||||
$(PROGRAM): $(OBJS)
|
||||
@$(MAKE_OBJDIR)
|
||||
ifeq ($(OS_ARCH)_$(NS_USE_GCC),WINNT_)
|
||||
$(CC) $(OBJS) -Fe$@ -link $(LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS)
|
||||
else
|
||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||
$(CC) $(OBJS) -Fe$@ $(LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS)
|
||||
else
|
||||
$(CC) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS)
|
||||
endif
|
||||
endif
|
||||
|
||||
$(LIBRARY): $(OBJS)
|
||||
@$(MAKE_OBJDIR)
|
||||
rm -f $@
|
||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||
$(AR) $(subst /,\\,$(OBJS)) $(AR_EXTRA_ARGS)
|
||||
else
|
||||
ifdef USE_AUTOCONF
|
||||
$(AR) $(AR_FLAGS) $(OBJS) $(AR_EXTRA_ARGS)
|
||||
else
|
||||
$(AR) $(OBJS) $(AR_EXTRA_ARGS)
|
||||
endif # USE_AUTOCONF
|
||||
endif
|
||||
$(RANLIB) $@
|
||||
|
||||
ifeq ($(OS_TARGET), WIN16)
|
||||
$(IMPORT_LIBRARY): $(SHARED_LIBRARY)
|
||||
wlib $(OS_LIB_FLAGS) $@ +$(SHARED_LIBRARY)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_TARGET), OS2)
|
||||
$(DEF_FILE): $(LIBRARY)
|
||||
rm -f $@
|
||||
echo LIBRARY $(notdir $(basename $(SHARED_LIBRARY))) INITINSTANCE TERMINSTANCE > $@
|
||||
echo PROTMODE >> $@
|
||||
echo CODE LOADONCALL MOVEABLE DISCARDABLE >> $@
|
||||
echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@
|
||||
echo EXPORTS >> $@
|
||||
$(FILTER) $(LIBRARY) >> $@
|
||||
|
||||
$(IMPORT_LIBRARY): $(DEF_FILE)
|
||||
rm -f $@
|
||||
$(IMPLIB) $@ $(DEF_FILE)
|
||||
endif
|
||||
|
||||
$(SHARED_LIBRARY): $(OBJS) $(DEF_FILE)
|
||||
@$(MAKE_OBJDIR)
|
||||
rm -f $@
|
||||
ifdef USE_AUTOCONF
|
||||
$(MKSHLIB) $(OBJS) $(EXTRA_LIBS) $(OS_LIBS) $(DEF_FILE)
|
||||
else
|
||||
ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
|
||||
echo "#!" > $(OBJDIR)/lib$(LIBRARY_NAME)_syms
|
||||
nm -B -C -g $(OBJS) \
|
||||
| awk '/ [T,D] / {print $$3}' \
|
||||
| sed -e 's/^\.//' \
|
||||
| sort -u >> $(OBJDIR)/lib$(LIBRARY_NAME)_syms
|
||||
$(LD) $(XCFLAGS) -o $@ $(OBJS) -bE:$(OBJDIR)/lib$(LIBRARY_NAME)_syms \
|
||||
-bM:SRE -bnoentry $(OS_LIBS) $(EXTRA_LIBS)
|
||||
else # AIX 4.1
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
ifeq ($(OS_TARGET), WIN16)
|
||||
echo system windows dll initinstance >w16link
|
||||
echo option map >>w16link
|
||||
echo option oneautodata >>w16link
|
||||
echo option heapsize=32K >>w16link
|
||||
echo option $(OS_DLL_OPTION) >>w16link
|
||||
echo debug $(DEBUGTYPE) all >>w16link
|
||||
echo name $@ >>w16link
|
||||
echo file >>w16link
|
||||
echo $(W16OBJS) >>w16link
|
||||
echo $(W16IMPORTS) >>w16link
|
||||
echo $(W16LIBS) >>w16link
|
||||
echo $(W16_EXPORTS) >>w16link
|
||||
echo libfile libentry >>w16link
|
||||
$(LINK) @w16link.
|
||||
rm w16link
|
||||
else # WIN16
|
||||
$(LINK_DLL) -MAP $(DLLBASE) $(OS_LIBS) $(EXTRA_LIBS) $(OBJS)
|
||||
endif # WINNT
|
||||
else
|
||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||
$(LINK_DLL) $(DLLBASE) $(OBJS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE)
|
||||
else # !os2 vacpp
|
||||
$(MKSHLIB) -o $@ $(OBJS) $(EXTRA_LIBS) $(OS_LIBS) $(DEF_FILE)
|
||||
endif # OS2 vacpp
|
||||
endif # WINNT
|
||||
endif # AIX 4.1
|
||||
endif # USE_AUTOCONF
|
||||
|
||||
|
||||
ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)))
|
||||
$(RES): $(RESNAME)
|
||||
@$(MAKE_OBJDIR)
|
||||
ifeq ($(OS_TARGET),OS2)
|
||||
$(RC) -DOS2 -r $(RESNAME) $(RES)
|
||||
else
|
||||
# The resource compiler does not understand the -U option.
|
||||
ifdef NS_USE_GCC
|
||||
$(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $<
|
||||
else
|
||||
$(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$(RES) $(RESNAME)
|
||||
endif
|
||||
endif
|
||||
@echo $(RES) finished
|
||||
endif
|
||||
|
||||
$(OBJDIR)/%.$(OBJ_SUFFIX): %.cpp
|
||||
@$(MAKE_OBJDIR)
|
||||
ifeq ($(OS_ARCH)_$(NS_USE_GCC), WINNT_)
|
||||
$(CCC) -Fo$@ -c $(CCCFLAGS) $<
|
||||
else
|
||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||
$(CCC) -Fo$@ -c $(CCCFLAGS) $<
|
||||
else
|
||||
$(CCC) -o $@ -c $(CCCFLAGS) $<
|
||||
endif
|
||||
endif
|
||||
|
||||
WCCFLAGS1 = $(subst /,\\,$(CFLAGS))
|
||||
WCCFLAGS2 = $(subst -I,-i=,$(WCCFLAGS1))
|
||||
WCCFLAGS3 = $(subst -D,-d,$(WCCFLAGS2))
|
||||
$(OBJDIR)/%.$(OBJ_SUFFIX): %.c
|
||||
@$(MAKE_OBJDIR)
|
||||
ifeq ($(OS_ARCH)_$(NS_USE_GCC), WINNT_)
|
||||
ifeq ($(OS_TARGET), WIN16)
|
||||
# $(MOD_DEPTH)/config/w16opt $(WCCFLAGS3)
|
||||
echo $(WCCFLAGS3) >w16wccf
|
||||
$(CC) -zq -fo$(OBJDIR)\\$*.$(OBJ_SUFFIX) @w16wccf $*.c
|
||||
rm w16wccf
|
||||
else
|
||||
$(CC) -Fo$@ -c $(CFLAGS) $<
|
||||
endif
|
||||
else
|
||||
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
||||
$(CC) -Fo$@ -c $(CFLAGS) $<
|
||||
else
|
||||
$(CC) -o $@ -c $(CFLAGS) $<
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
$(OBJDIR)/%.$(OBJ_SUFFIX): %.s
|
||||
@$(MAKE_OBJDIR)
|
||||
$(AS) -o $@ $(ASFLAGS) -c $<
|
||||
|
||||
%.i: %.c
|
||||
$(CC) -C -E $(CFLAGS) $< > $*.i
|
||||
|
||||
%: %.pl
|
||||
rm -f $@; cp $< $@; chmod +x $@
|
||||
|
||||
#
|
||||
# HACK ALERT
|
||||
#
|
||||
# The only purpose of this rule is to pass Mozilla's Tinderbox depend
|
||||
# builds (http://tinderbox.mozilla.org/showbuilds.cgi). Mozilla's
|
||||
# Tinderbox builds NSPR continuously as part of the Mozilla client.
|
||||
# Because NSPR's make depend is not implemented, whenever we change
|
||||
# an NSPR header file, the depend build does not recompile the NSPR
|
||||
# files that depend on the header.
|
||||
#
|
||||
# This rule makes all the objects depend on a dummy header file.
|
||||
# Touch this dummy header file to force the depend build to recompile
|
||||
# everything.
|
||||
#
|
||||
# This rule should be removed when make depend is implemented.
|
||||
#
|
||||
|
||||
DUMMY_DEPEND_H = $(topsrcdir)/config/prdepend.h
|
||||
|
||||
$(filter $(OBJDIR)/%.$(OBJ_SUFFIX),$(OBJS)): $(OBJDIR)/%.$(OBJ_SUFFIX): $(DUMMY_DEPEND_H)
|
||||
|
||||
# END OF HACK
|
||||
|
||||
################################################################################
|
||||
# Special gmake rules.
|
||||
################################################################################
|
||||
|
||||
#
|
||||
# Re-define the list of default suffixes, so gmake won't have to churn through
|
||||
# hundreds of built-in suffix rules for stuff we don't need.
|
||||
#
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .a .$(OBJ_SUFFIX) .c .cpp .s .h .i .pl
|
||||
|
||||
#
|
||||
# Fake targets. Always run these rules, even if a file/directory with that
|
||||
# name already exists.
|
||||
#
|
||||
.PHONY: all alltags clean export install libs realclean release
|
||||
|
||||
#
|
||||
# List the target pattern of an implicit rule as a dependency of the
|
||||
# special target .PRECIOUS to preserve intermediate files made by
|
||||
# implicit rules whose target patterns match that file's name.
|
||||
# (See GNU Make documentation, Edition 0.51, May 1996, Sec. 10.4,
|
||||
# p. 107.)
|
||||
#
|
||||
.PRECIOUS: $(OBJDIR)/%.$(OBJ_SUFFIX)
|
||||
@@ -1,119 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
#
|
||||
# win16_3.11.mk -- Make configuration for Win16
|
||||
#
|
||||
# This file configures gmake to build the Win16 variant of
|
||||
# NSPR 2.0. This file has the function of two files commonly
|
||||
# used on other platforms, for example: winnt.mk and
|
||||
# winnt4.0.mk. ... The packaging is easier and there is only
|
||||
# one variant of the Win16 target.
|
||||
#
|
||||
# Win16 is built using the Watcom C/C++ version 11.0
|
||||
# compiler. You gotta set up the compiler first. Follow the
|
||||
# directions in the manual (Ha! ... really, its not a
|
||||
# problem). The Watcom compiler depends on a few environment
|
||||
# variables; these environment variables define where the
|
||||
# compiler components are installed; they must be set before
|
||||
# running the make.
|
||||
#
|
||||
# Notes:
|
||||
# OS_CFLAGS is the command line options for the compiler when
|
||||
# building the .DLL object files.
|
||||
# OS_EXE_CFLAGS is the command line options for the compiler
|
||||
# when building the .EXE object files; this is for the test
|
||||
# programs.
|
||||
# the macro OS_CFLAGS is set to OS_EXE_CFLAGS inside of the
|
||||
# makefile for the pr/tests directory. ... Hack.
|
||||
#
|
||||
# USE_WATCOM_DEBUG_DATA environment variable causes the
|
||||
# watcom compiler flag to be set to -hw (otherwise
|
||||
# it is set to -hc (codeview debug data)) for debug builds.
|
||||
#
|
||||
|
||||
# -- configuration -----------------------------------------
|
||||
|
||||
CC = wcc
|
||||
CCC = wcl
|
||||
LINK = wlink
|
||||
AR = wlib -q $@
|
||||
RC = wrc.exe /r /dWIN16=1 /bt=windows
|
||||
RANLIB = echo
|
||||
BSDECHO = echo
|
||||
NSINSTALL = nsinstall
|
||||
INSTALL = $(NSINSTALL)
|
||||
MAKE_OBJDIR = mkdir $(OBJDIR)
|
||||
|
||||
XP_DEFINE = -DXP_PC
|
||||
OBJ_SUFFIX = obj
|
||||
LIB_SUFFIX = lib
|
||||
DLL_SUFFIX = dll
|
||||
|
||||
ifdef BUILD_OPT
|
||||
OBJDIR_TAG = _O
|
||||
OPTIMIZER = -oneatx -oh -oi -ei -3 -fpi87 -fp3 -s
|
||||
else
|
||||
ifdef USE_WATCOM_DEBUG_DATA
|
||||
OPTIMIZER = -d2 -hw -s -DDEBUG
|
||||
DEBUGTYPE = watcom
|
||||
else
|
||||
OPTIMIZER = -d2 -hc -s -DDEBUG
|
||||
DEBUGTYPE = codeview
|
||||
endif
|
||||
OBJDIR_TAG = _D
|
||||
endif
|
||||
|
||||
# XXX FIXME: I doubt we use this. It is redundant with
|
||||
# SHARED_LIBRARY.
|
||||
ifdef DLL
|
||||
DLL := $(addprefix $(OBJDIR)/, $(DLL))
|
||||
endif
|
||||
|
||||
|
||||
CPU_ARCH = x86
|
||||
OS_CFLAGS = -ml -3 -bd -zc -zu -bt=windows -d_X86_ -dWIN16 -d_WINDLL
|
||||
OS_EXE_CFLAGS = -ml -3 -bt=windows -d_X86_ -dWIN16
|
||||
OS_LIB_FLAGS = -c -iro -n
|
||||
|
||||
# Name of the binary code directories
|
||||
OBJDIR_NAME = $(OS_CONFIG)$(OBJDIR_TAG).OBJ
|
||||
|
||||
OS_DLL_OPTION = CASEEXACT
|
||||
OS_DLLFLAGS =
|
||||
OS_LIBS =
|
||||
W16_EXPORTS = #
|
||||
5828
mozilla/directory/c-sdk/configure
vendored
5828
mozilla/directory/c-sdk/configure
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,97 +0,0 @@
|
||||
#!gmake
|
||||
# -*- Mode: Makefile -*-
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Netscape Portable Runtime (NSPR).
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2001
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
|
||||
ifndef MOZ_SRC_FLIPPED
|
||||
$(error MOZ_SRC_FLIPPED is not set)
|
||||
endif
|
||||
|
||||
ifndef MOZ_TOP
|
||||
MOZ_TOP=mozilla
|
||||
endif
|
||||
|
||||
MOZ_DIST_FLIPPED = $(MOZ_SRC_FLIPPED)/mozilla/dist
|
||||
|
||||
ifdef MOZ_DEBUG
|
||||
MOZ_OBJDIR = WIN32_D.OBJ
|
||||
else
|
||||
MOZ_OBJDIR = WIN32_O.OBJ
|
||||
endif
|
||||
|
||||
LDAP_CONFIGURE := ../configure \
|
||||
--with-mozilla \
|
||||
--with-dist-prefix=$(MOZ_DIST_FLIPPED) \
|
||||
--with-dist-bindir=$(MOZ_DIST_FLIPPED)/$(MOZ_OBJDIR)/bin \
|
||||
--with-dist-libdir=$(MOZ_DIST_FLIPPED)/$(MOZ_OBJDIR)/lib \
|
||||
--without-nss
|
||||
|
||||
ifeq (,$(MOZ_DEBUG)$(MOZ_TRACE_MALLOC))
|
||||
LDAP_CONFIGURE := $(LDAP_CONFIGURE) --enable-optimize --disable-debug
|
||||
endif
|
||||
|
||||
define MAKE_OBJDIR
|
||||
if test ! -d $(@D) ; then rm -rf $(@D) ; nsinstall -D $(@D) ; fi
|
||||
endef
|
||||
|
||||
|
||||
all:: build_all
|
||||
|
||||
# Argh. nmake keeps the cwd from cmd to cmd and gmake does not
|
||||
# Furthermore, shmsdos doesn't support '&&' so there's a chance the
|
||||
# 'cd' could fail and configure would be run in the wrong dir
|
||||
#
|
||||
$(MOZ_OBJDIR)/config.status: configure configure.in
|
||||
@$(MAKE_OBJDIR)
|
||||
cd $(MOZ_OBJDIR)/ ; \
|
||||
sh $(LDAP_CONFIGURE)
|
||||
|
||||
build_all: $(MOZ_OBJDIR)/config.status check_old
|
||||
$(MAKE) -C $(MOZ_OBJDIR)
|
||||
|
||||
clobber_all: $(MOZ_OBJDIR)/config.status check_old
|
||||
$(MAKE) -C $(MOZ_OBJDIR) clobber_all
|
||||
|
||||
distclean: check_old
|
||||
rm -rf WIN32_D.OBJ WIN32_O.OBJ
|
||||
|
||||
check_old:
|
||||
@if test -f Makefile; then $(MAKE) distclean; fi
|
||||
|
||||
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code, released
|
||||
# March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../..
|
||||
NSPR_TREE = ..
|
||||
MOD_DEPTH = ..
|
||||
|
||||
include $(NSPR_TREE)/config/rules.mk
|
||||
include ../build.mk
|
||||
|
||||
SRCDIRS = build include libraries
|
||||
|
||||
ifeq ($(BUILDCLU), 1)
|
||||
SRCDIRS += clients/tools
|
||||
endif
|
||||
|
||||
all export:: FORCE
|
||||
@for i in $(SRCDIRS); do \
|
||||
echo " cd $$i; $(MAKE) -f Makefile.client $(MFLAGS) export"; \
|
||||
( cd $$i; $(MAKE) -f Makefile.client $(MFLAGS) export ); \
|
||||
done
|
||||
|
||||
libs install:: FORCE
|
||||
@for i in $(SRCDIRS); do \
|
||||
echo "cd $$i; $(MAKE) -f Makefile.client $(MFLAGS) install"; \
|
||||
( cd $$i; $(MAKE) -f Makefile.client $(MFLAGS) install ); \
|
||||
done
|
||||
|
||||
clean clobber:: FORCE
|
||||
@for i in $(SRCDIRS); do \
|
||||
echo "cd $$i; $(MAKE) -f Makefile.client $(MFLAGS) clean"; \
|
||||
( cd $$i; $(MAKE) -f Makefile.client $(MFLAGS) clean ); \
|
||||
done
|
||||
cd clients/tools; $(MAKE) -f Makefile.client $(MFLAGS) clean
|
||||
|
||||
realclean clobber_all:: FORCE
|
||||
@for i in $(SRCDIRS); do \
|
||||
echo "cd $$i; $(MAKE) -f Makefile.client $(MFLAGS) realclean"; \
|
||||
( cd $$i; $(MAKE) -f Makefile.client $(MFLAGS) realclean ); \
|
||||
done
|
||||
|
||||
FORCE:
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
MOD_DEPTH = ..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
|
||||
include $(MOD_DEPTH)/config/autoconf.mk
|
||||
|
||||
SRCDIRS = build include libraries
|
||||
ifeq ($(BUILDCLU), 1)
|
||||
SRCDIRS += clients/tools
|
||||
endif
|
||||
|
||||
DIRS = $(SRCDIRS)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
# dummy target to allow platforms without a compiler-based depend (like GCC
|
||||
# has) to call "make depend" here and not fail, at the cost of actual
|
||||
# dependencies on such builds possibly being incorrect. A nasty hack, but
|
||||
# this build system is going away soon.
|
||||
#
|
||||
depend:
|
||||
|
||||
FORCE:
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code, released
|
||||
# March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DEPTH = ../../../..
|
||||
MOD_DEPTH = ../..
|
||||
NSPR_TREE = ../..
|
||||
CSRCS = dirver.c
|
||||
|
||||
include $(NSPR_TREE)/config/rules.mk
|
||||
include ../../build.mk
|
||||
|
||||
TARGETS = $(OBJDIR)/dirver$(EXE_SUFFIX)
|
||||
|
||||
GARBAGE += $(TARGETS)
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
$(OBJS) = $(addprefix $(OBJDIR)/, $(CSRCS:.c=.o))
|
||||
$(TARGETS): $(OBJS)
|
||||
@$(MAKE_OBJDIR)
|
||||
$(LINK_EXE)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), OS2)
|
||||
$(OBJS) = $(addprefix $(OBJDIR)/, $(CSRCS:.c=.o))
|
||||
|
||||
$(TARGETS): $(OBJS)
|
||||
@$(MAKE_OBJDIR)
|
||||
$(LINK_EXE) -OUT:$@ $(OBJS)
|
||||
endif
|
||||
|
||||
export:: $(TARGETS)
|
||||
$(INSTALL) -m 555 $(TARGETS) ../$(DIST)/bin
|
||||
|
||||
install:: export
|
||||
|
||||
clean::
|
||||
rm -rf $(OBJDIR_NAME)
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code, released
|
||||
# March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
MOD_DEPTH = ../..
|
||||
srcdir = @srcdir@
|
||||
topsrcdir = @top_srcdir@
|
||||
|
||||
include $(MOD_DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/build.mk
|
||||
|
||||
CSRCS = dirver.c
|
||||
PROGRAM = dirver$(PROG_SUFFIX)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
||||
export:: $(PROGRAM)
|
||||
$(INSTALL) -m 555 $(PROGRAM) $(dist_bindir)
|
||||
|
||||
clean::
|
||||
-rm -rf $(filter-out . ..,$(OBJDIR_NAME))
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org LDAP SDK autoconf glue.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Commmunications Corp.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Dan Mosedale <dmose@mozilla.org>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
# this is used to override DIST and VPATH
|
||||
#
|
||||
NSPR_MY_OVERRIDES_MK = $(ldaptopsrcdir)/build/my_overrides.mk
|
||||
|
||||
# common to all the ldap sdk makefiles
|
||||
#
|
||||
NSPR_TREE = $(ldaptopsrcdir)/../../../nsprpub
|
||||
topsrcdir = $(ldaptopsrcdir)/../../../nsprpub
|
||||
|
||||
# various stuff from the ldap sdk documentation
|
||||
#
|
||||
MOZILLA_CLIENT = 1
|
||||
NO_MDUPDATE = 1
|
||||
MOZ_LDAP_SDK = 1
|
||||
MOZ_LI =
|
||||
MOZ_LITE =
|
||||
MOZ_MEDIUM =
|
||||
NO_SECURITY =
|
||||
|
||||
# we have to cope if nspr was built using autoconf (which we only know is
|
||||
# is true if our configure was passed --enable-nspr-autoconf -- which
|
||||
# the top-level configure does automagically, as appropriate).
|
||||
#
|
||||
NSPR_USE_AUTOCONF = @NSPR_USE_AUTOCONF@
|
||||
|
||||
ifeq ($(NSPR_USE_AUTOCONF), 1)
|
||||
|
||||
MOD_DEPTH = $(DEPTH)
|
||||
include $(DEPTH)/nsprpub/config/autoconf.mk
|
||||
VPATH = $(srcdir)
|
||||
DIST = $(DEPTH)/dist
|
||||
|
||||
else
|
||||
MOD_DEPTH = $(NSPR_TREE)
|
||||
|
||||
endif
|
||||
@@ -1,60 +0,0 @@
|
||||
#!/bin\sh
|
||||
#
|
||||
# compver.sh - a script to check if the correct component version is
|
||||
# available. If it is not available, it uses the nsftp.sh script to
|
||||
# download the component version. The component release is assumed
|
||||
# to be under /share/builds/components on a UNIX box.
|
||||
#
|
||||
COMP_ROOT=$1
|
||||
COMP_VERSION=$2
|
||||
COMP_VERSION_FILE=${COMP_ROOT}/Version
|
||||
COMPOBJDIR=$3
|
||||
MCOM_ROOT=$4
|
||||
MODULE=$5 # Module which needs this component
|
||||
COMP_RELEASE=$6 # Component release dir
|
||||
COMP_NAME=$7 # component name (e.g. ldapsdk, rouge)
|
||||
COMP_SUBDIRS=$8 # subdirs to ftp over
|
||||
TEST_FILE=$9 # to test if ftp was successful
|
||||
|
||||
if test -r ${COMP_VERSION_FILE}; then \
|
||||
CUR_VERSION=`cat ${COMP_VERSION_FILE}`; \
|
||||
|
||||
if test "${CUR_VERSION}" = "${COMP_VERSION}"; then \
|
||||
if test -d ${COMP_ROOT}/${COMPOBJDIR}; then \
|
||||
exit 0; \
|
||||
fi; \
|
||||
fi; \
|
||||
fi
|
||||
|
||||
echo "************************ WARNING *************************"
|
||||
echo "The MODULE ${MODULE} needs ${COMP_NAME} client libraries."
|
||||
echo "The ${COMP_NAME} client libraries are missing. "
|
||||
echo ""
|
||||
echo "Attempting to download..."
|
||||
|
||||
rm -rf ${COMP_ROOT}/${COMPOBJDIR} ${COMP_VERSION_FILE}
|
||||
mkdir -p ${COMP_ROOT}/${COMPOBJDIR}
|
||||
|
||||
sh ../../build/nsftp.sh ${COMP_NAME}/${COMP_VERSION}/${COMPOBJDIR} ${COMP_ROOT}/${COMPOBJDIR}
|
||||
|
||||
for d in ${COMP_SUBDIRS}; do \
|
||||
mkdir -p ${COMP_ROOT}/${COMPOBJDIR}/${d}; \
|
||||
sh ../../build/nsftp.sh ${COMP_NAME}/${COMP_VERSION}/${COMPOBJDIR}/${d} ${COMP_ROOT}/${COMPOBJDIR}/${d}
|
||||
done
|
||||
|
||||
if test -f ${TEST_FILE}; then \
|
||||
echo "${COMP_VERSION}" > ${COMP_VERSION_FILE}; \
|
||||
echo "************************ SUCCESS! ************************"; \
|
||||
else \
|
||||
echo ""; \
|
||||
echo "Attempt to ftp over ${COMP_NAME} failed!!!"; \
|
||||
echo "Please ftp over (${COMP_SUBDIRS}) subdirectories under:"; \
|
||||
echo " ${COMP_RELEASE}"; \
|
||||
echo "and put them under:"; \
|
||||
echo " ${COMP_ROOT}/${COMPOBJDIR}"; \
|
||||
echo "Also, execute the following command: "; \
|
||||
echo " echo \"${COMP_VERSION}\" > ${COMP_VERSION_FILE}"; \
|
||||
echo "Note: Above directories are w.r.t. the MODULE ${MODULE}"; \
|
||||
echo "**********************************************************"; \
|
||||
exit 1; \
|
||||
fi
|
||||
@@ -1,251 +0,0 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
/
|
||||
/ Name: Netscape File Version Generator
|
||||
/ Platforms: WIN32
|
||||
/ ......................................................................
|
||||
/ This program generates an ascii format of the 64-bit FILEVERSION
|
||||
/ resource identifier used by Windows executable binaries.
|
||||
/
|
||||
/ Usage Syntax:
|
||||
/ fversion <major.minor.patch> [mm/dd/yyyy] [outfile]
|
||||
/ If date is not specified, the current GMT date is used. yyyy must be
|
||||
/ greater than 1980
|
||||
/
|
||||
/ Usage Example:
|
||||
/ fversion 3.0.0
|
||||
/ fversion 6.5.4 1/30/2001
|
||||
/ fversion 6.5.4 1/30/2001 fileversion.h
|
||||
/
|
||||
/ see http://ntsbuild/sd/30ver.htm for specification
|
||||
/ ......................................................................
|
||||
/ Revision History:
|
||||
/ 01-30-97 Initial Version, Andy Hakim (ahakim@netscape.com)
|
||||
/ --------------------------------------------------------------------------*/
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#ifdef macintosh
|
||||
#include <console.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
unsigned _CalcVersion(unsigned nMajor, unsigned nMinor, unsigned nPatch)
|
||||
{
|
||||
unsigned nVersion;
|
||||
nVersion = nMajor;
|
||||
nVersion <<= 5;
|
||||
nVersion += nMinor;
|
||||
nVersion <<= 7;
|
||||
nVersion += nPatch;
|
||||
nVersion &= 0xFFFF;
|
||||
return(nVersion);
|
||||
}
|
||||
|
||||
|
||||
static void _GetVersions(char *szVer, unsigned *nMajor, unsigned *nMinor,
|
||||
unsigned *nPatch)
|
||||
{
|
||||
char szVersion[128];
|
||||
unsigned nReturn = 0;
|
||||
char *szToken;
|
||||
*nMajor = 0;
|
||||
*nMinor = 0;
|
||||
*nPatch = 0;
|
||||
|
||||
strcpy(szVersion, szVer);
|
||||
if(szToken = strtok(szVersion, ".\n"))
|
||||
{
|
||||
*nMajor = atoi(szToken);
|
||||
if(szToken = strtok(NULL, ".\n"))
|
||||
{
|
||||
*nMinor = atoi(szToken);
|
||||
if(szToken = strtok(NULL, ".\n"))
|
||||
{
|
||||
*nPatch = atoi(szToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
unsigned _CalcBuildDate(unsigned nYear, unsigned nMonth, unsigned nDay)
|
||||
{
|
||||
unsigned nBuildDate = 0;
|
||||
|
||||
if(nYear < 1900) /* they really mean 1900 + nYear */
|
||||
nYear += 1900;
|
||||
|
||||
nYear -= 1980;
|
||||
nBuildDate = nYear;
|
||||
/*
|
||||
nBuildDate <<= 5;
|
||||
*/
|
||||
nBuildDate <<= 4;
|
||||
nBuildDate += nMonth;
|
||||
/* nBuildDate <<= 4; */
|
||||
nBuildDate <<= 5;
|
||||
nBuildDate += nDay;
|
||||
nBuildDate &= 0xFFFF;
|
||||
return(nBuildDate);
|
||||
}
|
||||
|
||||
|
||||
|
||||
unsigned _GenBuildDate(char *szBuildDate)
|
||||
{
|
||||
unsigned nReturn = 0;
|
||||
char *szToken;
|
||||
unsigned nYear = 0;
|
||||
unsigned nMonth = 0;
|
||||
unsigned nDay = 0;
|
||||
|
||||
if((szBuildDate) && (strchr(szBuildDate, '\\') || strchr(szBuildDate, '/')) && (szToken = strtok(szBuildDate, "\\/")))
|
||||
{
|
||||
nMonth = atoi(szToken);
|
||||
nMonth--; /* use months in the range [0..11], as in struct tm */
|
||||
if(szToken = strtok(NULL, "\\/"))
|
||||
{
|
||||
nDay = atoi(szToken);
|
||||
if(szToken = strtok(NULL, "\\/"))
|
||||
{
|
||||
nYear = atoi(szToken);
|
||||
if(nYear < 70) { /* handle 2 digit years like (20)00 */
|
||||
nYear += 100;
|
||||
}
|
||||
else if (nYear < 100) {
|
||||
}
|
||||
else if (nYear > 1900){
|
||||
nYear -= 1900;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
struct tm *newtime;
|
||||
time_t ltime;
|
||||
|
||||
time( <ime );
|
||||
|
||||
/* Obtain coordinated universal time: */
|
||||
newtime = gmtime( <ime );
|
||||
nYear = newtime->tm_year;
|
||||
nMonth = newtime->tm_mon;
|
||||
nDay = newtime->tm_mday;
|
||||
}
|
||||
|
||||
nReturn = _CalcBuildDate(nYear, nMonth, nDay);
|
||||
return(nReturn);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void ShowHelp(char *szFilename)
|
||||
{
|
||||
fprintf(stdout, "%s: Generates ascii format #define for FILEVERSION\n", szFilename);
|
||||
fprintf(stdout, " resource identifier used by Windows executable binaries.\n");
|
||||
fprintf(stdout, "\n");
|
||||
fprintf(stdout, "Usage: %s <major.minor.patch> [mm/dd/yy] [outfile]\n", szFilename);
|
||||
fprintf(stdout, "\n");
|
||||
fprintf(stdout, "Examples:\n");
|
||||
fprintf(stdout, "%s 3.0.0\n", szFilename);
|
||||
fprintf(stdout, "%s 6.5.2 1/30/2001\n", szFilename);
|
||||
fprintf(stdout, "%s 6.5.2 1/30/2001 fileversion.h\n", szFilename);
|
||||
}
|
||||
|
||||
|
||||
|
||||
main(int nArgc, char **lpArgv)
|
||||
{
|
||||
int nReturn = 0;
|
||||
unsigned nVersion = 0;
|
||||
unsigned nBuildDate = 0;
|
||||
|
||||
#ifdef macintosh
|
||||
nArgc = ccommand( &lpArgv );
|
||||
#endif
|
||||
|
||||
if(nArgc < 2)
|
||||
{
|
||||
ShowHelp(lpArgv[0]);
|
||||
nReturn = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
char *szVersion = NULL;
|
||||
char *szDate = NULL;
|
||||
char *szOutput = NULL;
|
||||
FILE *f = stdout;
|
||||
unsigned nMajor = 0;
|
||||
unsigned nMinor = 0;
|
||||
unsigned nPatch = 0;
|
||||
|
||||
szVersion = (char *)lpArgv[1];
|
||||
szDate = (char *)lpArgv[2];
|
||||
szOutput = (char *)lpArgv[3];
|
||||
_GetVersions( szVersion, &nMajor, &nMinor, &nPatch );
|
||||
nVersion = _CalcVersion(nMajor, nMinor, nPatch);
|
||||
nBuildDate = _GenBuildDate(szDate);
|
||||
|
||||
if(nArgc >= 4) {
|
||||
if (( f = fopen(szOutput, "w")) == NULL ) {
|
||||
perror( szOutput );
|
||||
exit( 1 );
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(f, "#define VI_PRODUCTVERSION %u.%u\n", nMajor, nMinor);
|
||||
fprintf(f, "#define PRODUCTTEXT \"%s\"\n", szVersion );
|
||||
fprintf(f, "#define VI_FILEVERSION %u, 0, 0,%u\n",
|
||||
nVersion, nBuildDate);
|
||||
fprintf(f, "#define VI_FileVersion \"%s Build %u\\0\"\n",
|
||||
szVersion, nBuildDate);
|
||||
|
||||
if(nArgc >= 4)
|
||||
fclose(f);
|
||||
nReturn = (nVersion && !nBuildDate);
|
||||
}
|
||||
return(nReturn);
|
||||
}
|
||||
|
||||
@@ -1,219 +0,0 @@
|
||||
|
||||
#
|
||||
# genexports.pl: create up-to-date export and .def files
|
||||
#
|
||||
# created 31 August 1997 by Mark Smith <mcs@netscape.com>
|
||||
|
||||
$type = $ARGV[0];
|
||||
$tmplfile = $ARGV[1];
|
||||
$expfile = $ARGV[2];
|
||||
$buildtype = $ARGV[3];
|
||||
|
||||
if ( $type ne "Win16" && $type ne "Win16Rev" && $type ne "Win32" &&
|
||||
$type ne "WinBC" && $type ne "AIX" && $type ne "IRIX" &&
|
||||
$type ne "MacOS" && $type ne "SOLARIS" && $type ne "SunOS" &&
|
||||
$type ne "OS2" ) {
|
||||
usage();
|
||||
}
|
||||
|
||||
if ( $tmplfile eq "" || $expfile eq "" ) {
|
||||
usage();
|
||||
}
|
||||
|
||||
if ( $tmplfile ne "Standard" ) {
|
||||
open( TMPL, $tmplfile );
|
||||
while(<TMPL>) {
|
||||
$line = $_;
|
||||
&process_line( $type, $expfile, $line, $ARGV[3+1], $ARGV[3+2],
|
||||
$ARGV[3+3] );
|
||||
}
|
||||
} else {
|
||||
if ( substr( $type, 0, 3 ) eq "Win" ) {
|
||||
&windows_std( $type, $expfile, $ARGV[3+1], $ARGV[3+2], $ARGV[3+3] );
|
||||
} elsif ( $type eq "SOLARIS" || $type eq "SunOS" ) {
|
||||
&solaris_std( $type, $expfile, $ARGV[3+1], $ARGV[3+2], $ARGV[3+3] );
|
||||
} else {
|
||||
# Simple standard template just includes exports; this works for all others.
|
||||
&simple_std( $type, $expfile, $ARGV[3+1], $ARGV[3+2], $ARGV[3+3] );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# process_line( type, expfile, line, arg1, arg2, arg3 )
|
||||
sub
|
||||
process_line {
|
||||
local( $type, $expfile, $line, $arg1, $arg2, $arg3 ) = @_;
|
||||
|
||||
if ( $line eq "\$EXPORTS\n" ) {
|
||||
&print_exports( $type, $expfile );
|
||||
} else {
|
||||
$line =~ s/\$1/$arg1/;
|
||||
$line =~ s/\$2/$arg2/;
|
||||
$line =~ s/\$3/$arg3/;
|
||||
print $line;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# usage()
|
||||
sub
|
||||
usage {
|
||||
print STDERR "usage: genexports.pl TYPE TMPLFILE|Standard EXPFILE BUILDTYPE [ARG1 [[ARG2] [ARG3]]] > OUTFILE\n";
|
||||
print STDERR " where TYPE is Win16, Win16Rev, Win32, WinBC, AIX, IRIX, MacOS, or SOLARIS.\n";
|
||||
print STDERR " and where BUILDTYPE is matched against last field in export file.\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
|
||||
# print_exports( type, exports-file )
|
||||
sub
|
||||
print_exports {
|
||||
local( $type, $expfile ) = @_;
|
||||
|
||||
open( EXP, $expfile );
|
||||
&print_comment( $type, "\n" );
|
||||
&print_comment( $type, "exports list (generated by genexports.pl)\n" );
|
||||
&print_comment( $type, "\n" );
|
||||
while( <EXP> ) {
|
||||
$line = $_;
|
||||
if ( substr( $line, 0, 1 ) eq "#" ) {
|
||||
$line = substr( $line, 1 );
|
||||
$_ = $line;
|
||||
if ( /^[0-9]+[\t ]/ && $type ne "OS2" ) {
|
||||
&print_comment( $type, "" );
|
||||
&print_export( $type, $line );
|
||||
} else {
|
||||
&print_comment( $type, $line );
|
||||
}
|
||||
} elsif ( length( $line ) eq 1 && substr( $line, 0, 1 ) eq "\n" ) {
|
||||
print "\n";
|
||||
} else {
|
||||
&print_export( $type, $line );
|
||||
}
|
||||
}
|
||||
&print_comment( $type, "\n" );
|
||||
&print_comment( $type, "end of generated exports list.\n" );
|
||||
}
|
||||
|
||||
|
||||
# print_comment( type, s )
|
||||
sub
|
||||
print_comment {
|
||||
# do not print comments for OS2
|
||||
if ( $type ne "OS2" ) {
|
||||
local( $type, $s ) = @_;
|
||||
|
||||
if ( $type eq "AIX" ) {
|
||||
$prefix = "* ";
|
||||
} elsif ( substr( $type, 0, 3 ) ne "Win" ) {
|
||||
$prefix = "# ";
|
||||
} else {
|
||||
$prefix = "; ";
|
||||
}
|
||||
|
||||
print $prefix,$s
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# print_export( type, expline )
|
||||
sub
|
||||
print_export {
|
||||
local( $type, $expline ) = @_;
|
||||
|
||||
# strip trailing newline
|
||||
$expline =~ s/\n$//;
|
||||
|
||||
# split into pieces
|
||||
# lines look like: ORDINAL SYMBOL [SYMTYPE] [BUILDTYPE]
|
||||
# where SYMTYPE is "P" (for Pascal), "C", or "G" (for globals).
|
||||
# P is the default.
|
||||
($ordinal,$symbol,$symtype,$bldtype) = split( /[ \t]+/, $expline, 4 );
|
||||
$upcase_symbol = $symbol;
|
||||
$upcase_symbol =~ tr/a-z/A-Z/;
|
||||
if ( $symtype eq "" ) {
|
||||
$symtype = "P";
|
||||
}
|
||||
|
||||
if ( $bldtype ne "" && $bldtype ne $buildtype ) {
|
||||
return;
|
||||
}
|
||||
|
||||
# finally, print out an appropriate export line
|
||||
if ( $type eq "Win32" ) {
|
||||
if ( $symtype ne "G" ) {
|
||||
print "\t$symbol\t\t\@$ordinal\n";
|
||||
}
|
||||
} elsif ( $type eq "OS2" ) {
|
||||
if ( $symtype ne "G" ) {
|
||||
print "\t_$symbol\t\t\@$ordinal\n";
|
||||
}
|
||||
} elsif ( $type eq "Win16" ) {
|
||||
if ( $symtype eq "C" ) {
|
||||
print "\t_$symbol\t\t\@$ordinal\n";
|
||||
} elsif ( $symtype eq "P" ) {
|
||||
print "\t_$symbol=$upcase_symbol\t\t\@$ordinal\n";
|
||||
}
|
||||
} elsif ( $type eq "Win16Rev" ) {
|
||||
if ( $symtype ne "G" ) {
|
||||
print "\t$upcase_symbol=_$symbol\t\t\@$ordinal\n";
|
||||
}
|
||||
} elsif ( $type eq "WinBC" ) {
|
||||
if ( $symtype ne "G" ) {
|
||||
print "\t_$symbol=$symbol\t\t\@$ordinal\n";
|
||||
}
|
||||
} elsif ( $type eq "MacOS" ) {
|
||||
if ( $symtype ne "G" ) {
|
||||
print "$symbol\n";
|
||||
}
|
||||
} elsif ( $type eq "AIX" || $type eq "IRIX" ) {
|
||||
print "$symbol\n";
|
||||
} elsif ( $type eq "SOLARIS" || $type eq "SunOS") {
|
||||
print "\t$symbol;\n";
|
||||
} else {
|
||||
print STDERR "print_export: unknown type <$type>\n";
|
||||
exit 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# windows_std( type, expfile, arg1, arg2, arg3 )
|
||||
sub
|
||||
windows_std {
|
||||
local( $type, $expfile, $arg1, $arg2, $arg3 ) = @_;
|
||||
|
||||
process_line( $type, $expfile, "LIBRARY\tNSLIB\$1\n" );
|
||||
if ( substr( $type, 0, 5 ) eq "Win16" ) {
|
||||
process_line( $type, $expfile, "CODE\tPRELOAD MOVEABLE DISCARDABLE\n" );
|
||||
process_line( $type, $expfile, "DATA\tPRELOAD MOVEABLE SINGLE\n" );
|
||||
}
|
||||
process_line( $type, $expfile, "VERSION\t\$2\n" );
|
||||
process_line( $type, $expfile, "HEAPSIZE\t4096\n" );
|
||||
process_line( $type, $expfile, "EXPORTS\n" );
|
||||
process_line( $type, $expfile, "\$EXPORTS\n" );
|
||||
}
|
||||
|
||||
|
||||
# solaris_std( type, expfile, arg1, arg2, arg3 )
|
||||
sub
|
||||
solaris_std {
|
||||
local( $type, $expfile, $arg1, $arg2, $arg3 ) = @_;
|
||||
|
||||
process_line( $type, $expfile, "{\n" );
|
||||
process_line( $type, $expfile, "global:\n" );
|
||||
process_line( $type, $expfile, "\$EXPORTS\n" );
|
||||
process_line( $type, $expfile, "\n" );
|
||||
process_line( $type, $expfile, "local:\n" );
|
||||
process_line( $type, $expfile, "\t*;\n" );
|
||||
process_line( $type, $expfile, "};\n" );
|
||||
}
|
||||
|
||||
|
||||
# simple_std( type, expfile, arg1, arg2, arg3 )
|
||||
sub
|
||||
simple_std {
|
||||
local( $type, $expfile, $arg1, $arg2, $arg3 ) = @_;
|
||||
|
||||
process_line( $type, $expfile, "\$EXPORTS\n" );
|
||||
}
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is mozilla.org LDAP SDK autoconf glue.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Commmunications Corp.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2000
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Dan Mosedale <dmose@mozilla.org>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
DIST = $(DEPTH)/dist
|
||||
VPATH = $(srcdir)
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# FTP script for downloading /share/builds/components stuff.
|
||||
#
|
||||
# syntax:
|
||||
# nsftp <srcdir-relative to /share/builds/components> <destdir>
|
||||
#
|
||||
# Example
|
||||
#
|
||||
# nsftp ldapsdk/19961108 c:\3.0\ns\components\ldapsdk
|
||||
#
|
||||
|
||||
SERVER=ftp-rel
|
||||
USER=ftpman
|
||||
PASSWD=ftpman
|
||||
TMPFILE=tmp.foo
|
||||
|
||||
SRC=$1
|
||||
DEST=$2
|
||||
if [ -z "$3" ]; then
|
||||
FILENAME=*
|
||||
else
|
||||
FILENAME=$3
|
||||
fi
|
||||
|
||||
echo ${USER} contents of ${SRC} to ${DEST}
|
||||
|
||||
cd ${DEST}
|
||||
ftp -n ${SERVER} << -=EOF=-
|
||||
user ${USER} ${PASSWD}
|
||||
binary
|
||||
hash
|
||||
prompt
|
||||
cd ${SRC}
|
||||
mget ${FILENAME}
|
||||
quit
|
||||
-=EOF=-
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#
|
||||
# replace.pl: perform simple string substitution on a file
|
||||
# the first line in the input (template) file is also discarded.
|
||||
#
|
||||
# usage: perl replace.pl KEYWORD=VALUE... < TMPLFILE > OUTFILE
|
||||
#
|
||||
# created 17 October 2001 by Mark Smith <mcs@netscape.com>
|
||||
|
||||
use File::Basename;
|
||||
push @INC, dirname($0);
|
||||
|
||||
require replace;
|
||||
|
||||
%keywords = {};
|
||||
|
||||
foreach $str (@ARGV) {
|
||||
($key,$val) = split( "=", $str, 2 );
|
||||
$keywords{$key} = $val;
|
||||
}
|
||||
|
||||
replace::GenerateHeader(*STDIN, *STDOUT, \%keywords);
|
||||
|
||||
exit 0;
|
||||
@@ -1,39 +0,0 @@
|
||||
#!perl -w
|
||||
package replace;
|
||||
|
||||
require 5.004;
|
||||
|
||||
use strict;
|
||||
require Exporter;
|
||||
|
||||
use vars qw(@ISA @EXPORT);
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(
|
||||
GenerateHeader
|
||||
);
|
||||
|
||||
sub GenerateHeader ($$\%) {
|
||||
my($template, $header, $keywords) = @_;
|
||||
local(*TEMPLATE) = $template;
|
||||
local(*HEADER) = $header;
|
||||
|
||||
my($first_line) = 1;
|
||||
my($orig, $replace);
|
||||
|
||||
while(<TEMPLATE>) {
|
||||
my $line = $_;
|
||||
while(($orig, $replace) = each %$keywords) {
|
||||
$line =~ s/{{$orig}}/$replace/g;
|
||||
}
|
||||
|
||||
# the first line is a comment specific to the template file, which we
|
||||
# don't want to transfer over
|
||||
#
|
||||
if ( ! $first_line ) {
|
||||
print HEADER $line;
|
||||
} else {
|
||||
$first_line = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,383 +0,0 @@
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code, released
|
||||
# March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
MOD_DEPTH = ../../..
|
||||
srcdir = .
|
||||
topsrcdir = ../../..
|
||||
|
||||
include $(MOD_DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/build.mk
|
||||
|
||||
INSTALLDIR = $(DIST)/$(OBJDIR_NAME)/bin
|
||||
HEADERDIR = $(MOD_DEPTH)/dist/$(OBJDIR_NAME)
|
||||
|
||||
INCLUDES += -I$(HEADERDIR)/include \
|
||||
-I$(DIST)/include/obsolete \
|
||||
-I$(DIST)/include/nspr \
|
||||
-I$(DIST)/include \
|
||||
-I$(DIST)/public/security \
|
||||
-I$(DIST)/public/nss \
|
||||
-I$(DIST)/public/ldap \
|
||||
-I$(topsrcdir)/ldap/include
|
||||
|
||||
ifeq ($(HAVE_CCONF), 1)
|
||||
COMPS_FROM_OBJDIR=1
|
||||
endif
|
||||
|
||||
#
|
||||
# The "arg pin" feature depends on the server core library.
|
||||
#
|
||||
ifeq ($(HAVE_SVRCORE), 1)
|
||||
LDAP_TOOL_ARGPIN=1
|
||||
endif
|
||||
|
||||
ifeq ($(LDAP_TOOL_ARGPIN),1)
|
||||
INCLUDES += -I../../../../../dist/public/svrcore
|
||||
CFLAGS+=-DLDAP_TOOL_ARGPIN -DLDAP_TOOL_PKCS11
|
||||
SVRCORE_LINK=-l$(SVRCORE_LIBNAME)
|
||||
endif
|
||||
|
||||
ifdef HAVE_LIBNLS
|
||||
INCLUDES += -I$(LIBNLS_INCLUDES)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
DEFS += -DXP_WIN -DXP_WIN32
|
||||
endif
|
||||
DEFINES += $(DEFS)
|
||||
|
||||
CXXSRCS = convutf8.cpp
|
||||
|
||||
OBJDEST = $(OBJDIR_NAME)
|
||||
BINDIR = $(OBJDIR_NAME)/bin
|
||||
LIBDIR = $(OBJDIR_NAME)/lib
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
LDAPDELETE_OBJ = $(addprefix $(OBJDEST)/, ldapdelete.obj)
|
||||
LDAPMODIFY_OBJ = $(addprefix $(OBJDEST)/, ldapmodify.obj)
|
||||
LDAPSEARCH_OBJ = $(addprefix $(OBJDEST)/, ldapsearch.obj)
|
||||
LDAPCOMPARE_OBJ = $(addprefix $(OBJDEST)/, ldapcompare.obj)
|
||||
LDAPCMP_OBJ = $(addprefix $(OBJDEST)/, ldapcmp.obj)
|
||||
LDAPTOOLCOMMON_OBJ = $(addprefix $(OBJDEST)/, common.obj) \
|
||||
$(addprefix $(OBJDEST)/, convutf8.obj) \
|
||||
$(addprefix $(OBJDEST)/, fileurl.obj)
|
||||
ifeq ($(LDAP_TOOL_ARGPIN),1)
|
||||
LDAPTOOLCOMMON_OBJ += $(addprefix $(OBJDEST)/, argpin.obj) \
|
||||
$(addprefix $(OBJDEST)/, ntuserpin.obj)
|
||||
endif
|
||||
else
|
||||
LDAPDELETE_OBJ = $(addprefix $(OBJDEST)/, ldapdelete.o)
|
||||
LDAPMODIFY_OBJ = $(addprefix $(OBJDEST)/, ldapmodify.o)
|
||||
LDAPSEARCH_OBJ = $(addprefix $(OBJDEST)/, ldapsearch.o)
|
||||
LDAPCOMPARE_OBJ = $(addprefix $(OBJDEST)/, ldapcompare.o)
|
||||
LDAPCMP_OBJ = $(addprefix $(OBJDEST)/, ldapcmp.o)
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
LDAPTOOLCOMMON_OBJ = $(addprefix $(OBJDEST)/, common.o) \
|
||||
$(addprefix $(OBJDEST)/, fileurl.o)
|
||||
else
|
||||
LDAPTOOLCOMMON_OBJ = $(addprefix $(OBJDEST)/, common.o) \
|
||||
$(addprefix $(OBJDEST)/, convutf8.o) \
|
||||
$(addprefix $(OBJDEST)/, fileurl.o)
|
||||
endif
|
||||
ifeq ($(LDAP_TOOL_ARGPIN),1)
|
||||
LDAPTOOLCOMMON_OBJ += $(addprefix $(OBJDEST)/, argpin.o) \
|
||||
$(addprefix $(OBJDEST)/, ntuserpin.o)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
LDAPTOOLCPPCOMMON_OBJ = $(addprefix $(OBJDEST)/, convutf8.o)
|
||||
endif
|
||||
|
||||
CLIENT_OBJS = $(LDAPDELETE_OBJ) $(LDAPMODIFY_OBJ) \
|
||||
$(LDAPSEARCH_OBJ) $(LDAPCOMPARE_OBJ) $(LDAPCMP_OBJ) $(LDAPTOOLCOMMON_OBJ)
|
||||
|
||||
LDAPDELETE = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, ldapdelete))
|
||||
LDAPMODIFY = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, ldapmodify))
|
||||
LDAPSEARCH = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, ldapsearch))
|
||||
LDAPCOMPARE = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, ldapcompare))
|
||||
LDAPCMP = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, ldapcmp))
|
||||
|
||||
BINS= $(LDAPDELETE) $(LDAPMODIFY) $(LDAPSEARCH) $(LDAPCOMPARE) $(LDAPCMP)
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
LDTOOLS_LIBS += $(LIBNSPR)
|
||||
else
|
||||
LDTOOLS_LIBS += $(DYNAMICNSPR)
|
||||
endif
|
||||
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
LDAPTOOLS_NSS_LINK=-l$(SSL_LIBNAME) -l$(NSS_LIBNAME) -l$(SOFTOKN_LIBNAME)
|
||||
else
|
||||
LDAPTOOLS_NSS_LINK=-l$(SSL_LIBNAME) -l$(NSS_LIBNAME)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), SunOS)
|
||||
EXTRA_LIBS = -L$(DIST)/$(OBJDIR_NAME)/lib -l$(LDAP_LIBNAME) \
|
||||
-l$(LDIF_LIBNAME) -l$(SSLDAP_LIBNAME) -l$(PRLDAP_LIBNAME) \
|
||||
-L$(DIST)/lib $(SVRCORE_LINK) \
|
||||
$(LDAPTOOLS_NSS_LINK) \
|
||||
-lthread -lposix4 -lsocket -lnls \
|
||||
-ldl -lresolv -lgen
|
||||
EXTRA_LIBS += -L$(DIST)/lib $(DYNAMICNSPR)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
EXTRA_LIBS =wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
|
||||
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
|
||||
rpcrt4.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(LBER_LIBNAME).lib
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(LDAP_LIBNAME).lib
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(LDIF_LIBNAME).lib
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(PLC_BASENAME).lib
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(PLDS_BASENAME).lib
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(NSPR_BASENAME).lib
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(UTIL_LIBNAME).lib
|
||||
ifeq ($(LDAP_TOOL_ARGPIN),1)
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(SVRCORE_LIBNAME).lib
|
||||
endif
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(SSLDAP_LIBNAME).lib
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(PRLDAP_LIBNAME).lib
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(NSS_LIBNAME).lib
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(SOFTOKN_LIBNAME).lib
|
||||
endif
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(SSL_LIBNAME).lib
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), OSF1)
|
||||
EXTRA_LIBS = -L$(DIST)/$(OBJDIR_NAME)/lib -l$(LDAP_LIBNAME) \
|
||||
-l$(LDIF_LIBNAME) -l$(SSLDAP_LIBNAME) -l$(PRLDAP_LIBNAME) \
|
||||
-L$(DIST)/lib $(SVRCORE_LINK) \
|
||||
$(LDAPTOOLS_NSS_LINK) \
|
||||
-lcxx -lpthread -lrt -lmach -lexc
|
||||
EXTRA_LIBS += -L$(DIST)/lib $(DYNAMICNSPR)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), Linux)
|
||||
EXTRA_LIBS = -L$(DIST)/$(OBJDIR_NAME)/lib -l$(LDAP_LIBNAME) \
|
||||
-l$(LDIF_LIBNAME) -l$(SSLDAP_LIBNAME) -l$(PRLDAP_LIBNAME) \
|
||||
-L$(DIST)/lib $(SVRCORE_LINK) \
|
||||
$(LDAPTOOLS_NSS_LINK) \
|
||||
-l$(LBER_LIBNAME) \
|
||||
-ldl -lresolv -lpthread
|
||||
EXTRA_LIBS += -L$(DIST)/lib $(DYNAMICNSPR)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
EXTRA_LIBS = -ldld -lm -lpthread -lrt \
|
||||
-L$(DIST)/$(OBJDIR_NAME)/lib -l$(LDAP_LIBNAME) \
|
||||
-l$(LDIF_LIBNAME) -l$(SSLDAP_LIBNAME) -l$(PRLDAP_LIBNAME) \
|
||||
-L$(DIST)/lib $(SVRCORE_LINK) -l$(LBER_LIBNAME) \
|
||||
$(LDAPTOOLS_NSS_LINK)
|
||||
EXTRA_LIBS += -L$(DIST)/lib $(DYNAMICNSPR)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), AIX)
|
||||
EXTRA_LIBS = -L$(DIST)/$(OBJDIR_NAME)/lib -l$(LDAP_LIBNAME) \
|
||||
-l$(LDIF_LIBNAME) -l$(SSLDAP_LIBNAME) -l$(PRLDAP_LIBNAME) \
|
||||
-L$(DIST)/lib $(SVRCORE_LINK) \
|
||||
$(LDAPTOOLS_NSS_LINK) \
|
||||
-ldl -brtl -lpthreads -lc_r -lm
|
||||
EXTRA_LIBS += -L$(DIST)/lib $(DYNAMICNSPR)
|
||||
endif
|
||||
|
||||
ifdef HAVE_LIBNLS
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
EXTRA_LIBS += $(LIBNLS_LIBDIR)/$(NSCNV_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSJPN_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSCCK_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSSB_LIBNAME)
|
||||
else
|
||||
ifeq ($(OS_ARCH), SunOS)
|
||||
OS_VERS := $(shell uname -r)
|
||||
ifeq ($(OS_VERS),5.6)
|
||||
EXTRA_LIBS += $(LIBNLS_LIBDIR)/$(NSCNV_LIBNAME) -lC \
|
||||
$(LIBNLS_LIBDIR)/$(NSJPN_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSCCK_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSSB_LIBNAME)
|
||||
else
|
||||
EXTRA_LIBS += $(LIBNLS_LIBDIR)/$(NSCNV_LIBNAME) -lCrun \
|
||||
$(LIBNLS_LIBDIR)/$(NSJPN_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSCCK_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSSB_LIBNAME)
|
||||
endif
|
||||
else
|
||||
endif
|
||||
EXTRA_LIBS += $(LIBNLS_LIBDIR)/$(NSCNV_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSJPN_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSCCK_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSSB_LIBNAME)
|
||||
endif
|
||||
endif
|
||||
|
||||
LDTOOLS_LIBS += $(EXTRA_LIBS)
|
||||
LIBLOCATION = $(DIST)/$(OBJDIR_NAME)/lib
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
###########################################################################
|
||||
|
||||
all:: $(BINS) $(OBJDEST) linklibnls libdir $(BINS)
|
||||
|
||||
libdir: linklibnls
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
$(NSINSTALL) $(LIBLOCATION)/$(LDAP_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(LIBLOCATION)/$(PRLDAP_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(LIBLOCATION)/$(SSLDAP_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
else
|
||||
$(NSINSTALL) $(LIBLOCATION)/lib$(LDAP_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(LIBLOCATION)/lib$(PRLDAP_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(LIBLOCATION)/lib$(SSLDAP_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
ifeq ($(COMPS_FROM_OBJDIR), 1)
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/$(PLC_BASENAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/$(PLDS_BASENAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/$(NSPR_BASENAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/$(SSL_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/$(NSS_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/$(SOFTOKN_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
else
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/lib$(PLC_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/lib$(PLDS_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/lib$(NSPR_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/lib$(SSL_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/lib$(NSS_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/lib$(SOFTOKN_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(COPYFREEBL), 1)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/lib$(HYBRID_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/lib$(PURE32_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
else
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
$(NSINSTALL) $(DIST)/lib/$(PLC_BASENAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/lib/$(PLDS_BASENAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/lib/$(NSPR_BASENAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/lib/$(SSL_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/lib/$(NSS_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
$(NSINSTALL) $(DIST)/lib/$(SOFTOKN_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
else
|
||||
$(NSINSTALL) $(DIST)/lib/lib$(PLC_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/lib/lib$(PLDS_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/lib/lib$(NSPR_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/lib/lib$(SSL_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/lib/lib$(NSS_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
$(NSINSTALL) $(DIST)/lib/lib$(SOFTOKN_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(COPYFREEBL), 1)
|
||||
$(NSINSTALL) $(DIST)/lib/lib$(HYBRID_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/lib/lib$(PURE32_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
linklibnls: FORCE
|
||||
ifneq ($(COMPONENT_PULL_METHOD), FTP)
|
||||
ifeq ($(HAVE_LIBNLS), 1)
|
||||
$(RM) -f $(LIBNLS_INCLUDES)
|
||||
$(RM) -f $(LIBNLS_LIBDIR)
|
||||
ln -s $(LIBNLS_INCLUDES_LOC) $(LIBNLS_INCLUDES)
|
||||
ln -s $(LIBNLS_LIB_LOC) $(LIBNLS_LIBDIR)
|
||||
endif
|
||||
else
|
||||
ifeq ($(HAVE_LIBNLS), 1)
|
||||
@echo "Pulling libnls......"
|
||||
# The following shell script recalculates $(NLS_INCLUDE), $(NLS_LIBPATH) and
|
||||
# $(NLS_VERSION_FILE)
|
||||
sh ../../build/compver.sh $(LIBNLS_DIR) $(LIBNLS_RELDATE) \
|
||||
$(OBJDIR_NAME) ../../../../dist ldapsdk \
|
||||
/share/builds/components/libnls$(NLS_LIBVERSION)/$(LIBNLS_RELDATE)/$(OBJDIR_NAME) \
|
||||
libnls$(NLS_LIBVERSION) \
|
||||
"include lib conv$(NLS_LIBVERSION) locale$(NLS_LIBVERSION)" \
|
||||
../../../../../dist/libnls$(NLS_LIBVERSION)/$(OBJDIR_NAME)/locale$(NLS_LIBVERSION)/index.txt
|
||||
endif
|
||||
endif
|
||||
|
||||
$(LDAPTOOLCOMMON_OBJ):
|
||||
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
$(LDAPTOOLCPPCOMMON_OBJ): convutf8.cpp
|
||||
ifneq ($(USE_64), 1)
|
||||
/opt/aCC/bin/aCC -ext -DHPUX_ACC -D__STDC_EXT__ -D_POSIX_C_SOURCE=199506L -c -DHPUX11 -DHPUX11_00 +DAportable +DS1.1 -D_LARGEFILE64_SOURCE -D_PR_HAVE_OFF64_T -DNO_NODELOCK -DNO_LIBLCACHE -DXP_UNIX -DHPUX -DMCC_HTTPD -DNS_DOMESTIC -DNET_SSL -DCLIENT_AUTH -DNSPR20 -D_PR_NTHREAD -D_PR_USECPU -D_REENTRANT -DNS_DS -DSPAPI20 -DBUILD_NUM=\"01.081.1519\" -DCPU_hppa -DOS_hpux -D_NO_THREADS_ -Dhpux -Dhpux -D_HPUX_SOURCE -D_REENTRANT -Aa -DLDAP_REFERRALS -DLDAP_LDBM -DLDAP_LDIF -DLDBM_USE_DBBTREE -DSLAPD_PASSWD_SHA1 -D__DBINTERFACE_PRIVATE -DNO_LIBLCACHE -DNS_DIRECTORY -DNET_SSL -DUSE_NSPR_MT -O $(INCLUDES) convutf8.cpp -o $(OBJDIR_NAME)/convutf8.o
|
||||
else
|
||||
/opt/aCC/bin/aCC -DHPUX_ACC -D__STDC_EXT__ -D_POSIX_C_SOURCE=199506L +DA2.0W +DS2.0 -c -DHPUX11 -DHPUX11_00 -DIS_64 +e +DA2.0W +DS2.0 -D_LARGEFILE64_SOURCE -D_PR_HAVE_OFF64_T -DNO_NODELOCK -DNO_LIBLCACHE -DXP_UNIX -DHPUX -DMCC_DEBUG -g -DMCC_HTTPD -DNS_DOMESTIC -DNET_SSL -DCLIENT_AUTH -DNSPR20 -D_PR_NTHREAD -D_PR_USECPU -D_REENTRANT -DNS_DS -DSPAPI20 -DBUILD_NUM=\"01.081.1617\" -DCPU_hppa -DOS_hpux -D_NO_THREADS_ -Dhpux -Dhpux -D_HPUX_SOURCE -D_REENTRANT -Aa -DLDAP_DEBUG -DLDAP_REFERRALS -DLDAP_LDBM -DLDAP_LDIF -DLDBM_USE_DBBTREE -DSLAPD_PASSWD_SHA1 -D__DBINTERFACE_PRIVATE -DNO_LIBLCACHE -DNS_DIRECTORY -DNET_SSL -DUSE_NSPR_MT $(INCLUDES) -g convutf8.cpp -o $(OBJDIR_NAME)/convutf8.o
|
||||
endif
|
||||
else
|
||||
$(LDAPTOOLCPPCOMMON_OBJ):
|
||||
|
||||
endif
|
||||
|
||||
$(LDAPCOMPARE): $(LDAPCOMPARE_OBJ) $(LDAPTOOLCOMMON_OBJ) \
|
||||
$(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS_DEP)
|
||||
$(LINK_EXE) $(LDAPCOMPARE_OBJ) $(LDAPTOOLCOMMON_OBJ) $(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS)
|
||||
|
||||
$(LDAPDELETE): $(LDAPDELETE_OBJ) $(LDAPTOOLCOMMON_OBJ) \
|
||||
$(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS_DEP)
|
||||
$(LINK_EXE) $(LDAPDELETE_OBJ) $(LDAPTOOLCOMMON_OBJ) $(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS)
|
||||
|
||||
$(LDAPMODIFY): $(LDAPMODIFY_OBJ) $(LDAPTOOLCOMMON_OBJ) \
|
||||
$(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS_DEP)
|
||||
$(LINK_EXE) $(LDAPMODIFY_OBJ) $(LDAPTOOLCOMMON_OBJ) $(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS)
|
||||
|
||||
$(LDAPSEARCH): $(LDAPSEARCH_OBJ) $(LDAPTOOLCOMMON_OBJ) \
|
||||
$(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS_DEP)
|
||||
$(LINK_EXE) $(LDAPSEARCH_OBJ) $(LDAPTOOLCOMMON_OBJ) $(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS)
|
||||
|
||||
$(LDAPCMP): $(LDAPCMP_OBJ) $(LDAPTOOLCOMMON_OBJ) \
|
||||
$(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS_DEP)
|
||||
$(LINK_EXE) $(LDAPCMP_OBJ) $(LDAPTOOLCOMMON_OBJ) $(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS)
|
||||
|
||||
$(OBJDEST):
|
||||
$(NSINSTALL) -D $(OBJDEST)
|
||||
$(NSINSTALL) -D $(BINDIR)
|
||||
$(NSINSTALL) -D $(LIBDIR)
|
||||
|
||||
export:: $(OBJDEST) libdir $(BINS)
|
||||
$(NSINSTALL) $(LDAPDELETE) $(INSTALLDIR)
|
||||
$(NSINSTALL) $(LDAPSEARCH) $(INSTALLDIR)
|
||||
$(NSINSTALL) $(LDAPMODIFY) $(INSTALLDIR)
|
||||
$(NSINSTALL) $(LDAPCOMPARE) $(INSTALLDIR)
|
||||
$(NSINSTALL) $(LDAPCMP) $(INSTALLDIR)
|
||||
|
||||
|
||||
#
|
||||
# Simple, local dependencies
|
||||
#
|
||||
LDAPTOOL_COMMON_DEPS = ldaptool.h Makefile
|
||||
$(LDAPTOOLCOMMON_OBJ): $(LDAPTOOL_COMMON_DEPS)
|
||||
$(LDAPDELETE_OBJ): $(LDAPTOOL_COMMON_DEPS)
|
||||
$(LDAPMODIFY_OBJ): $(LDAPTOOL_COMMON_DEPS) fileurl.h
|
||||
$(LDAPSEARCH_OBJ): $(LDAPTOOL_COMMON_DEPS) fileurl.h
|
||||
$(LDAPCOMPARE_OBJ): $(LDAPTOOL_COMMON_DEPS)
|
||||
$(LDAPCMP_OBJ): $(LDAPTOOL_COMMON_DEPS)
|
||||
|
||||
FORCE:
|
||||
@@ -1,401 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code, released
|
||||
# March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
NS_DEPTH = ../../../..
|
||||
DEPTH = ../../../../..
|
||||
LDAP_SRC = ../..
|
||||
NSCP_DISTDIR = ../../../../../dist
|
||||
NSPR_TREE = ../../..
|
||||
MOD_DEPTH = ../../..
|
||||
|
||||
include $(NSPR_TREE)/config/rules.mk
|
||||
include ../../../build.mk
|
||||
|
||||
INSTALLDIR = $(NSCP_DISTDIR)/$(OBJDIR_NAME)/bin
|
||||
HEADERDIR = $(DEPTH)/dist/$(OBJDIR_NAME)
|
||||
|
||||
INCLUDES += -I$(HEADERDIR)/include \
|
||||
-I../../../../../dist/include/obsolete \
|
||||
-I../../../../../dist/include \
|
||||
-I../../../../../dist/public/security \
|
||||
-I../../../../../dist/public/nss \
|
||||
-I$(NSCP_DISTDIR)/public/ldap \
|
||||
-I../../../ldap/include \
|
||||
|
||||
ifeq ($(HAVE_CCONF), 1)
|
||||
COMPS_FROM_OBJDIR=1
|
||||
endif
|
||||
|
||||
#
|
||||
# The "arg pin" feature depends on the server core library.
|
||||
#
|
||||
ifeq ($(HAVE_SVRCORE), 1)
|
||||
LDAP_TOOL_ARGPIN=1
|
||||
endif
|
||||
|
||||
ifeq ($(LDAP_TOOL_ARGPIN),1)
|
||||
INCLUDES += -I../../../../../dist/public/svrcore
|
||||
CFLAGS+=-DLDAP_TOOL_ARGPIN -DLDAP_TOOL_PKCS11
|
||||
SVRCORE_LINK=-l$(SVRCORE_LIBNAME)
|
||||
endif
|
||||
|
||||
ifdef HAVE_LIBNLS
|
||||
INCLUDES += -I$(LIBNLS_INCLUDES)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
DEFS += -DXP_WIN -DXP_WIN32
|
||||
endif
|
||||
DEFINES += $(DEFS)
|
||||
|
||||
CXXSRCS = convutf8.cpp
|
||||
|
||||
OBJDEST = $(OBJDIR_NAME)
|
||||
BINDIR = $(OBJDIR_NAME)/bin
|
||||
LIBDIR = $(OBJDIR_NAME)/lib
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
LDAPDELETE_OBJ = $(addprefix $(OBJDEST)/, ldapdelete.obj)
|
||||
LDAPMODIFY_OBJ = $(addprefix $(OBJDEST)/, ldapmodify.obj)
|
||||
LDAPSEARCH_OBJ = $(addprefix $(OBJDEST)/, ldapsearch.obj)
|
||||
LDAPCOMPARE_OBJ = $(addprefix $(OBJDEST)/, ldapcompare.obj)
|
||||
LDAPCMP_OBJ = $(addprefix $(OBJDEST)/, ldapcmp.obj)
|
||||
LDAPTOOLCOMMON_OBJ = $(addprefix $(OBJDEST)/, common.obj) \
|
||||
$(addprefix $(OBJDEST)/, convutf8.obj) \
|
||||
$(addprefix $(OBJDEST)/, fileurl.obj)
|
||||
ifeq ($(LDAP_TOOL_ARGPIN),1)
|
||||
LDAPTOOLCOMMON_OBJ += $(addprefix $(OBJDEST)/, argpin.obj) \
|
||||
$(addprefix $(OBJDEST)/, ntuserpin.obj)
|
||||
endif
|
||||
else
|
||||
LDAPDELETE_OBJ = $(addprefix $(OBJDEST)/, ldapdelete.o)
|
||||
LDAPMODIFY_OBJ = $(addprefix $(OBJDEST)/, ldapmodify.o)
|
||||
LDAPSEARCH_OBJ = $(addprefix $(OBJDEST)/, ldapsearch.o)
|
||||
LDAPCOMPARE_OBJ = $(addprefix $(OBJDEST)/, ldapcompare.o)
|
||||
LDAPCMP_OBJ = $(addprefix $(OBJDEST)/, ldapcmp.o)
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
LDAPTOOLCOMMON_OBJ = $(addprefix $(OBJDEST)/, common.o) \
|
||||
$(addprefix $(OBJDEST)/, fileurl.o)
|
||||
else
|
||||
LDAPTOOLCOMMON_OBJ = $(addprefix $(OBJDEST)/, common.o) \
|
||||
$(addprefix $(OBJDEST)/, convutf8.o) \
|
||||
$(addprefix $(OBJDEST)/, fileurl.o)
|
||||
endif
|
||||
ifeq ($(LDAP_TOOL_ARGPIN),1)
|
||||
LDAPTOOLCOMMON_OBJ += $(addprefix $(OBJDEST)/, argpin.o) \
|
||||
$(addprefix $(OBJDEST)/, ntuserpin.o)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
LDAPTOOLCPPCOMMON_OBJ = $(addprefix $(OBJDEST)/, convutf8.o)
|
||||
endif
|
||||
|
||||
CLIENT_OBJS = $(LDAPDELETE_OBJ) $(LDAPMODIFY_OBJ) \
|
||||
$(LDAPSEARCH_OBJ) $(LDAPCOMPARE_OBJ) $(LDAPCMP_OBJ) $(LDAPTOOLCOMMON_OBJ)
|
||||
|
||||
LDAPDELETE = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, ldapdelete))
|
||||
LDAPMODIFY = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, ldapmodify))
|
||||
LDAPSEARCH = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, ldapsearch))
|
||||
LDAPCOMPARE = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, ldapcompare))
|
||||
LDAPCMP = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, ldapcmp))
|
||||
|
||||
BINS= $(LDAPDELETE) $(LDAPMODIFY) $(LDAPSEARCH) $(LDAPCOMPARE) $(LDAPCMP)
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
LDTOOLS_LIBS += $(LIBNSPR)
|
||||
else
|
||||
LDTOOLS_LIBS += $(DYNAMICNSPR)
|
||||
endif
|
||||
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
LDAPTOOLS_NSS_LINK=-l$(SSL_LIBNAME) -l$(NSS_LIBNAME) -l$(SOFTOKN_LIBNAME)
|
||||
else
|
||||
LDAPTOOLS_NSS_LINK=-l$(SSL_LIBNAME) -l$(NSS_LIBNAME)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), SunOS)
|
||||
EXTRA_LIBS = -L$(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib -l$(LDAP_LIBNAME) \
|
||||
-l$(LDIF_LIBNAME) -l$(SSLDAP_LIBNAME) -l$(PRLDAP_LIBNAME) \
|
||||
-L$(NSCP_DISTDIR)/lib $(SVRCORE_LINK) \
|
||||
$(LDAPTOOLS_NSS_LINK) \
|
||||
-lthread -lposix4 -lsocket -lnls \
|
||||
-ldl -lresolv -lgen
|
||||
EXTRA_LIBS += -L$(NSCP_DISTDIR)/lib $(DYNAMICNSPR)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
EXTRA_LIBS =wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
|
||||
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
|
||||
rpcrt4.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib
|
||||
EXTRA_LIBS += $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(LBER_LIBNAME).lib
|
||||
EXTRA_LIBS += $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(LDAP_LIBNAME).lib
|
||||
EXTRA_LIBS += $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(LDIF_LIBNAME).lib
|
||||
EXTRA_LIBS += $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(PLC_BASENAME).lib
|
||||
EXTRA_LIBS += $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(PLDS_BASENAME).lib
|
||||
EXTRA_LIBS += $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(NSPR_BASENAME).lib
|
||||
EXTRA_LIBS += $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(UTIL_LIBNAME).lib
|
||||
ifeq ($(LDAP_TOOL_ARGPIN),1)
|
||||
EXTRA_LIBS += $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(SVRCORE_LIBNAME).lib
|
||||
endif
|
||||
EXTRA_LIBS += $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(SSLDAP_LIBNAME).lib
|
||||
EXTRA_LIBS += $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(PRLDAP_LIBNAME).lib
|
||||
EXTRA_LIBS += $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(NSS_LIBNAME).lib
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
EXTRA_LIBS += $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(SOFTOKN_LIBNAME).lib
|
||||
endif
|
||||
EXTRA_LIBS += $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(SSL_LIBNAME).lib
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), OSF1)
|
||||
EXTRA_LIBS = -L$(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib -l$(LDAP_LIBNAME) \
|
||||
-l$(LDIF_LIBNAME) -l$(SSLDAP_LIBNAME) -l$(PRLDAP_LIBNAME) \
|
||||
-L$(NSCP_DISTDIR)/lib $(SVRCORE_LINK) \
|
||||
$(LDAPTOOLS_NSS_LINK) \
|
||||
-lcxx -lpthread -lrt -lmach -lexc
|
||||
EXTRA_LIBS += -L$(NSCP_DISTDIR)/lib $(DYNAMICNSPR)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), Linux)
|
||||
EXTRA_LIBS = -L$(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib -l$(LDAP_LIBNAME) \
|
||||
-l$(LDIF_LIBNAME) -l$(SSLDAP_LIBNAME) -l$(PRLDAP_LIBNAME) \
|
||||
-L$(NSCP_DISTDIR)/lib $(SVRCORE_LINK) \
|
||||
$(LDAPTOOLS_NSS_LINK) \
|
||||
-l$(LBER_LIBNAME) \
|
||||
-ldl -lresolv -lpthread
|
||||
EXTRA_LIBS += -L$(NSCP_DISTDIR)/lib $(DYNAMICNSPR)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
EXTRA_LIBS = -ldld -lm -lpthread -lrt \
|
||||
-L$(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib -l$(LDAP_LIBNAME) \
|
||||
-l$(LDIF_LIBNAME) -l$(SSLDAP_LIBNAME) -l$(PRLDAP_LIBNAME) \
|
||||
-L$(NSCP_DISTDIR)/lib $(SVRCORE_LINK) \
|
||||
$(LDAPTOOLS_NSS_LINK) -l$(LBER_LIBNAME)
|
||||
EXTRA_LIBS += -L$(NSCP_DISTDIR)/lib $(DYNAMICNSPR)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), AIX)
|
||||
EXTRA_LIBS = -L$(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib -l$(LDAP_LIBNAME) \
|
||||
-l$(LDIF_LIBNAME) -l$(SSLDAP_LIBNAME) -l$(PRLDAP_LIBNAME) \
|
||||
-L$(NSCP_DISTDIR)/lib $(SVRCORE_LINK) \
|
||||
$(LDAPTOOLS_NSS_LINK) \
|
||||
-ldl -brtl -lpthreads -lc_r -lm
|
||||
EXTRA_LIBS += -L$(NSCP_DISTDIR)/lib $(DYNAMICNSPR)
|
||||
endif
|
||||
|
||||
ifdef HAVE_LIBNLS
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
EXTRA_LIBS += $(LIBNLS_LIBDIR)/$(NSCNV_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSJPN_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSCCK_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSSB_LIBNAME)
|
||||
else
|
||||
ifeq ($(OS_ARCH), SunOS)
|
||||
OS_VERS := $(shell uname -r)
|
||||
ifeq ($(OS_VERS),5.6)
|
||||
EXTRA_LIBS += $(LIBNLS_LIBDIR)/$(NSCNV_LIBNAME) -lC \
|
||||
$(LIBNLS_LIBDIR)/$(NSJPN_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSCCK_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSSB_LIBNAME)
|
||||
else
|
||||
EXTRA_LIBS += $(LIBNLS_LIBDIR)/$(NSCNV_LIBNAME) -lCrun \
|
||||
$(LIBNLS_LIBDIR)/$(NSJPN_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSCCK_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSSB_LIBNAME)
|
||||
endif
|
||||
else
|
||||
endif
|
||||
EXTRA_LIBS += $(LIBNLS_LIBDIR)/$(NSCNV_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSJPN_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSCCK_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSSB_LIBNAME)
|
||||
endif
|
||||
endif
|
||||
|
||||
LDTOOLS_LIBS += $(EXTRA_LIBS)
|
||||
LIBLOCATION = $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib
|
||||
|
||||
###########################################################################
|
||||
|
||||
all:: $(BINS) $(OBJDEST) linklibnls libdir $(BINS)
|
||||
|
||||
libdir: linklibnls
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
$(NSINSTALL) $(LIBLOCATION)/$(LDAP_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(LIBLOCATION)/$(PRLDAP_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(LIBLOCATION)/$(SSLDAP_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
else
|
||||
$(NSINSTALL) $(LIBLOCATION)/lib$(LDAP_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(LIBLOCATION)/lib$(PRLDAP_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(LIBLOCATION)/lib$(SSLDAP_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
ifeq ($(COMPS_FROM_OBJDIR), 1)
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(PLC_BASENAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(PLDS_BASENAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(NSPR_BASENAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(SSL_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(NSS_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/$(SOFTOKN_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
else
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/lib$(PLC_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/lib$(PLDS_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/lib$(NSPR_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/lib$(SSL_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/lib$(NSS_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/lib$(SOFTOKN_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(COPYFREEBL), 1)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/lib$(HYBRID_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib/lib$(PURE32_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
else
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/lib/$(PLC_BASENAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/lib/$(PLDS_BASENAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/lib/$(NSPR_BASENAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/lib/$(SSL_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/lib/$(NSS_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/lib/$(SOFTOKN_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
else
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/lib/lib$(PLC_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/lib/lib$(PLDS_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/lib/lib$(NSPR_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/lib/lib$(SSL_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/lib/lib$(NSS_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/lib/lib$(SOFTOKN_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(COPYFREEBL), 1)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/lib/lib$(HYBRID_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(NSCP_DISTDIR)/lib/lib$(PURE32_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
linklibnls: FORCE
|
||||
ifneq ($(COMPONENT_PULL_METHOD), FTP)
|
||||
ifeq ($(HAVE_LIBNLS), 1)
|
||||
$(RM) -f $(LIBNLS_INCLUDES)
|
||||
$(RM) -f $(LIBNLS_LIBDIR)
|
||||
ln -s $(LIBNLS_INCLUDES_LOC) $(LIBNLS_INCLUDES)
|
||||
ln -s $(LIBNLS_LIB_LOC) $(LIBNLS_LIBDIR)
|
||||
endif
|
||||
else
|
||||
ifeq ($(HAVE_LIBNLS), 1)
|
||||
@echo "Pulling libnls......"
|
||||
# The following shell script recalculates $(NLS_INCLUDE), $(NLS_LIBPATH) and
|
||||
# $(NLS_VERSION_FILE)
|
||||
sh ../../build/compver.sh $(LIBNLS_DIR) $(LIBNLS_RELDATE) \
|
||||
$(OBJDIR_NAME) ../../../../dist ldapsdk \
|
||||
/share/builds/components/libnls$(NLS_LIBVERSION)/$(LIBNLS_RELDATE)/$(OBJDIR_NAME) \
|
||||
libnls$(NLS_LIBVERSION) \
|
||||
"include lib conv$(NLS_LIBVERSION) locale$(NLS_LIBVERSION)" \
|
||||
../../../../../dist/libnls$(NLS_LIBVERSION)/$(OBJDIR_NAME)/locale$(NLS_LIBVERSION)/index.txt
|
||||
endif
|
||||
endif
|
||||
|
||||
$(LDAPTOOLCOMMON_OBJ):
|
||||
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
$(LDAPTOOLCPPCOMMON_OBJ): convutf8.cpp
|
||||
ifneq ($(USE_64), 1)
|
||||
/opt/aCC/bin/aCC -ext -DHPUX_ACC -D__STDC_EXT__ -D_POSIX_C_SOURCE=199506L -c -DHPUX11 -DHPUX11_00 +DAportable +DS1.1 -D_LARGEFILE64_SOURCE -D_PR_HAVE_OFF64_T -DNO_NODELOCK -DNO_LIBLCACHE -DXP_UNIX -DHPUX -DMCC_HTTPD -DNS_DOMESTIC -DNET_SSL -DCLIENT_AUTH -DNSPR20 -D_PR_NTHREAD -D_PR_USECPU -D_REENTRANT -DNS_DS -DSPAPI20 -DBUILD_NUM=\"01.081.1519\" -DCPU_hppa -DOS_hpux -D_NO_THREADS_ -Dhpux -Dhpux -D_HPUX_SOURCE -D_REENTRANT -Aa -DLDAP_REFERRALS -DLDAP_LDBM -DLDAP_LDIF -DLDBM_USE_DBBTREE -DSLAPD_PASSWD_SHA1 -D__DBINTERFACE_PRIVATE -DNO_LIBLCACHE -DNS_DIRECTORY -DNET_SSL -DUSE_NSPR_MT -O $(INCLUDES) convutf8.cpp -o $(OBJDIR_NAME)/convutf8.o
|
||||
else
|
||||
/opt/aCC/bin/aCC -DHPUX_ACC -D__STDC_EXT__ -D_POSIX_C_SOURCE=199506L +DA2.0W +DS2.0 -c -DHPUX11 -DHPUX11_00 -DIS_64 +e +DA2.0W +DS2.0 -D_LARGEFILE64_SOURCE -D_PR_HAVE_OFF64_T -DNO_NODELOCK -DNO_LIBLCACHE -DXP_UNIX -DHPUX -DMCC_DEBUG -g -DMCC_HTTPD -DNS_DOMESTIC -DNET_SSL -DCLIENT_AUTH -DNSPR20 -D_PR_NTHREAD -D_PR_USECPU -D_REENTRANT -DNS_DS -DSPAPI20 -DBUILD_NUM=\"01.081.1617\" -DCPU_hppa -DOS_hpux -D_NO_THREADS_ -Dhpux -Dhpux -D_HPUX_SOURCE -D_REENTRANT -Aa -DLDAP_DEBUG -DLDAP_REFERRALS -DLDAP_LDBM -DLDAP_LDIF -DLDBM_USE_DBBTREE -DSLAPD_PASSWD_SHA1 -D__DBINTERFACE_PRIVATE -DNO_LIBLCACHE -DNS_DIRECTORY -DNET_SSL -DUSE_NSPR_MT $(INCLUDES) -g convutf8.cpp -o $(OBJDIR_NAME)/convutf8.o
|
||||
endif
|
||||
else
|
||||
$(LDAPTOOLCPPCOMMON_OBJ):
|
||||
|
||||
endif
|
||||
|
||||
$(LDAPCOMPARE): $(LDAPCOMPARE_OBJ) $(LDAPTOOLCOMMON_OBJ) \
|
||||
$(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS_DEP)
|
||||
$(LINK_EXE) $(LDAPCOMPARE_OBJ) $(LDAPTOOLCOMMON_OBJ) $(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS)
|
||||
|
||||
$(LDAPDELETE): $(LDAPDELETE_OBJ) $(LDAPTOOLCOMMON_OBJ) \
|
||||
$(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS_DEP)
|
||||
$(LINK_EXE) $(LDAPDELETE_OBJ) $(LDAPTOOLCOMMON_OBJ) $(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS)
|
||||
|
||||
$(LDAPMODIFY): $(LDAPMODIFY_OBJ) $(LDAPTOOLCOMMON_OBJ) \
|
||||
$(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS_DEP)
|
||||
$(LINK_EXE) $(LDAPMODIFY_OBJ) $(LDAPTOOLCOMMON_OBJ) $(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS)
|
||||
|
||||
$(LDAPSEARCH): $(LDAPSEARCH_OBJ) $(LDAPTOOLCOMMON_OBJ) \
|
||||
$(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS_DEP)
|
||||
$(LINK_EXE) $(LDAPSEARCH_OBJ) $(LDAPTOOLCOMMON_OBJ) $(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS)
|
||||
|
||||
$(LDAPCMP): $(LDAPCMP_OBJ) $(LDAPTOOLCOMMON_OBJ) \
|
||||
$(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS_DEP)
|
||||
$(LINK_EXE) $(LDAPCMP_OBJ) $(LDAPTOOLCOMMON_OBJ) $(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS)
|
||||
|
||||
$(OBJDEST):
|
||||
$(NSINSTALL) -D $(OBJDEST)
|
||||
$(NSINSTALL) -D $(BINDIR)
|
||||
$(NSINSTALL) -D $(LIBDIR)
|
||||
|
||||
clean::
|
||||
$(RM) -rf $(OBJDEST)
|
||||
|
||||
install:: $(OBJDEST) libdir $(BINS)
|
||||
$(NSINSTALL) $(LDAPDELETE) $(INSTALLDIR)
|
||||
$(NSINSTALL) $(LDAPSEARCH) $(INSTALLDIR)
|
||||
$(NSINSTALL) $(LDAPMODIFY) $(INSTALLDIR)
|
||||
$(NSINSTALL) $(LDAPCOMPARE) $(INSTALLDIR)
|
||||
$(NSINSTALL) $(LDAPCMP) $(INSTALLDIR)
|
||||
|
||||
|
||||
#
|
||||
# Simple, local dependencies
|
||||
#
|
||||
LDAPTOOL_COMMON_DEPS = ldaptool.h Makefile
|
||||
$(LDAPTOOLCOMMON_OBJ): $(LDAPTOOL_COMMON_DEPS)
|
||||
$(LDAPDELETE_OBJ): $(LDAPTOOL_COMMON_DEPS)
|
||||
$(LDAPMODIFY_OBJ): $(LDAPTOOL_COMMON_DEPS) fileurl.h
|
||||
$(LDAPSEARCH_OBJ): $(LDAPTOOL_COMMON_DEPS) fileurl.h
|
||||
$(LDAPCOMPARE_OBJ): $(LDAPTOOL_COMMON_DEPS)
|
||||
$(LDAPCMP_OBJ): $(LDAPTOOL_COMMON_DEPS)
|
||||
|
||||
FORCE:
|
||||
@@ -1,398 +0,0 @@
|
||||
#
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is Mozilla Communicator client code, released
|
||||
# March 31, 1998.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Netscape Communications Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
MOD_DEPTH = ../../..
|
||||
srcdir = @srcdir@
|
||||
topsrcdir = @top_srcdir@
|
||||
|
||||
include $(MOD_DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/build.mk
|
||||
|
||||
INSTALLDIR = $(DIST)/$(OBJDIR_NAME)/bin
|
||||
HEADERDIR = $(MOD_DEPTH)/dist/$(OBJDIR_NAME)
|
||||
|
||||
INCLUDES += -I$(HEADERDIR)/include \
|
||||
-I$(DIST)/include/obsolete \
|
||||
-I$(DIST)/include/nspr \
|
||||
-I$(DIST)/include \
|
||||
-I$(DIST)/public/security \
|
||||
-I$(DIST)/public/nss \
|
||||
-I$(DIST)/public/ldap \
|
||||
-I$(topsrcdir)/ldap/include
|
||||
|
||||
ifeq ($(HAVE_CCONF), 1)
|
||||
COMPS_FROM_OBJDIR=1
|
||||
endif
|
||||
|
||||
#
|
||||
# The "arg pin" feature depends on the server core library.
|
||||
#
|
||||
ifeq ($(HAVE_SVRCORE), 1)
|
||||
LDAP_TOOL_ARGPIN=1
|
||||
endif
|
||||
|
||||
ifeq ($(LDAP_TOOL_ARGPIN),1)
|
||||
INCLUDES += -I../../../../../dist/public/svrcore
|
||||
CFLAGS+=-DLDAP_TOOL_ARGPIN -DLDAP_TOOL_PKCS11
|
||||
SVRCORE_LINK=-l$(SVRCORE_LIBNAME)
|
||||
endif
|
||||
|
||||
ifdef HAVE_LIBNLS
|
||||
INCLUDES += -I$(LIBNLS_INCLUDES)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
DEFS += -DXP_WIN -DXP_WIN32
|
||||
endif
|
||||
DEFINES += $(DEFS)
|
||||
|
||||
CXXSRCS = convutf8.cpp
|
||||
|
||||
OBJDEST = $(OBJDIR_NAME)
|
||||
BINDIR = $(OBJDIR_NAME)/bin
|
||||
LIBDIR = $(OBJDIR_NAME)/lib
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
LDAPDELETE_OBJ = $(addprefix $(OBJDEST)/, ldapdelete.obj)
|
||||
LDAPMODIFY_OBJ = $(addprefix $(OBJDEST)/, ldapmodify.obj)
|
||||
LDAPSEARCH_OBJ = $(addprefix $(OBJDEST)/, ldapsearch.obj)
|
||||
LDAPCOMPARE_OBJ = $(addprefix $(OBJDEST)/, ldapcompare.obj)
|
||||
LDAPCMP_OBJ = $(addprefix $(OBJDEST)/, ldapcmp.obj)
|
||||
LDAPTOOLCOMMON_OBJ = $(addprefix $(OBJDEST)/, common.obj) \
|
||||
$(addprefix $(OBJDEST)/, convutf8.obj) \
|
||||
$(addprefix $(OBJDEST)/, fileurl.obj)
|
||||
ifeq ($(LDAP_TOOL_ARGPIN),1)
|
||||
LDAPTOOLCOMMON_OBJ += $(addprefix $(OBJDEST)/, argpin.obj) \
|
||||
$(addprefix $(OBJDEST)/, ntuserpin.obj)
|
||||
endif
|
||||
else
|
||||
LDAPDELETE_OBJ = $(addprefix $(OBJDEST)/, ldapdelete.o)
|
||||
LDAPMODIFY_OBJ = $(addprefix $(OBJDEST)/, ldapmodify.o)
|
||||
LDAPSEARCH_OBJ = $(addprefix $(OBJDEST)/, ldapsearch.o)
|
||||
LDAPCOMPARE_OBJ = $(addprefix $(OBJDEST)/, ldapcompare.o)
|
||||
LDAPCMP_OBJ = $(addprefix $(OBJDEST)/, ldapcmp.o)
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
LDAPTOOLCOMMON_OBJ = $(addprefix $(OBJDEST)/, common.o) \
|
||||
$(addprefix $(OBJDEST)/, fileurl.o)
|
||||
else
|
||||
LDAPTOOLCOMMON_OBJ = $(addprefix $(OBJDEST)/, common.o) \
|
||||
$(addprefix $(OBJDEST)/, convutf8.o) \
|
||||
$(addprefix $(OBJDEST)/, fileurl.o)
|
||||
endif
|
||||
ifeq ($(LDAP_TOOL_ARGPIN),1)
|
||||
LDAPTOOLCOMMON_OBJ += $(addprefix $(OBJDEST)/, argpin.o) \
|
||||
$(addprefix $(OBJDEST)/, ntuserpin.o)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
LDAPTOOLCPPCOMMON_OBJ = $(addprefix $(OBJDEST)/, convutf8.o)
|
||||
endif
|
||||
|
||||
CLIENT_OBJS = $(LDAPDELETE_OBJ) $(LDAPMODIFY_OBJ) \
|
||||
$(LDAPSEARCH_OBJ) $(LDAPCOMPARE_OBJ) $(LDAPCMP_OBJ) $(LDAPTOOLCOMMON_OBJ)
|
||||
|
||||
LDAPDELETE = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, ldapdelete))
|
||||
LDAPMODIFY = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, ldapmodify))
|
||||
LDAPSEARCH = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, ldapsearch))
|
||||
LDAPCOMPARE = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, ldapcompare))
|
||||
LDAPCMP = $(addsuffix $(EXE_SUFFIX), $(addprefix $(BINDIR)/, ldapcmp))
|
||||
|
||||
BINS= $(LDAPDELETE) $(LDAPMODIFY) $(LDAPSEARCH) $(LDAPCOMPARE) $(LDAPCMP)
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
LDTOOLS_LIBS += $(LIBNSPR)
|
||||
else
|
||||
LDTOOLS_LIBS += $(DYNAMICNSPR)
|
||||
endif
|
||||
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
LDAPTOOLS_NSS_LINK=-l$(SSL_LIBNAME) -l$(NSS_LIBNAME) -l$(SOFTOKN_LIBNAME)
|
||||
else
|
||||
LDAPTOOLS_NSS_LINK=-l$(SSL_LIBNAME) -l$(NSS_LIBNAME)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), SunOS)
|
||||
EXTRA_LIBS = -L$(DIST)/$(OBJDIR_NAME)/lib -l$(LDAP_LIBNAME) \
|
||||
-l$(LDIF_LIBNAME) -l$(SSLDAP_LIBNAME) -l$(PRLDAP_LIBNAME) \
|
||||
-L$(DIST)/lib $(SVRCORE_LINK) \
|
||||
$(LDAPTOOLS_NSS_LINK) \
|
||||
-lthread -lposix4 -lsocket -lnls \
|
||||
-ldl -lresolv -lgen
|
||||
EXTRA_LIBS += -L$(DIST)/lib $(DYNAMICNSPR)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
EXTRA_LIBS =wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
|
||||
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
|
||||
rpcrt4.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(LBER_LIBNAME).lib
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(LDAP_LIBNAME).lib
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(LDIF_LIBNAME).lib
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(PLC_BASENAME).lib
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(PLDS_BASENAME).lib
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(NSPR_BASENAME).lib
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(UTIL_LIBNAME).lib
|
||||
ifeq ($(LDAP_TOOL_ARGPIN),1)
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(SVRCORE_LIBNAME).lib
|
||||
endif
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(SSLDAP_LIBNAME).lib
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(PRLDAP_LIBNAME).lib
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(NSS_LIBNAME).lib
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(SOFTOKN_LIBNAME).lib
|
||||
endif
|
||||
EXTRA_LIBS += $(DIST)/$(OBJDIR_NAME)/lib/$(SSL_LIBNAME).lib
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), OSF1)
|
||||
EXTRA_LIBS = -L$(DIST)/$(OBJDIR_NAME)/lib -l$(LDAP_LIBNAME) \
|
||||
-l$(LDIF_LIBNAME) -l$(SSLDAP_LIBNAME) -l$(PRLDAP_LIBNAME) \
|
||||
-L$(DIST)/lib $(SVRCORE_LINK) \
|
||||
$(LDAPTOOLS_NSS_LINK) \
|
||||
-lcxx -lpthread -lrt -lmach -lexc
|
||||
EXTRA_LIBS += -L$(DIST)/lib $(DYNAMICNSPR)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), Linux)
|
||||
EXTRA_LIBS = -L$(DIST)/$(OBJDIR_NAME)/lib -l$(LDAP_LIBNAME) \
|
||||
-l$(LDIF_LIBNAME) -l$(SSLDAP_LIBNAME) -l$(PRLDAP_LIBNAME) \
|
||||
-L$(DIST)/lib $(SVRCORE_LINK) \
|
||||
$(LDAPTOOLS_NSS_LINK) \
|
||||
-l$(LBER_LIBNAME) \
|
||||
-ldl -lresolv -lpthread
|
||||
EXTRA_LIBS += -L$(DIST)/lib $(DYNAMICNSPR)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
EXTRA_LIBS = -ldld -lm -lpthread -lrt \
|
||||
-L$(DIST)/$(OBJDIR_NAME)/lib -l$(LDAP_LIBNAME) \
|
||||
-l$(LDIF_LIBNAME) -l$(SSLDAP_LIBNAME) -l$(PRLDAP_LIBNAME) \
|
||||
-L$(DIST)/lib $(SVRCORE_LINK) -l$(LBER_LIBNAME) \
|
||||
$(LDAPTOOLS_NSS_LINK)
|
||||
EXTRA_LIBS += -L$(DIST)/lib $(DYNAMICNSPR)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH), AIX)
|
||||
EXTRA_LIBS = -L$(DIST)/$(OBJDIR_NAME)/lib -l$(LDAP_LIBNAME) \
|
||||
-l$(LDIF_LIBNAME) -l$(SSLDAP_LIBNAME) -l$(PRLDAP_LIBNAME) \
|
||||
-L$(DIST)/lib $(SVRCORE_LINK) \
|
||||
$(LDAPTOOLS_NSS_LINK) \
|
||||
-ldl -brtl -lpthreads -lc_r -lm
|
||||
EXTRA_LIBS += -L$(DIST)/lib $(DYNAMICNSPR)
|
||||
endif
|
||||
|
||||
ifdef HAVE_LIBNLS
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
EXTRA_LIBS += $(LIBNLS_LIBDIR)/$(NSCNV_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSJPN_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSCCK_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSSB_LIBNAME)
|
||||
else
|
||||
ifeq ($(OS_ARCH), SunOS)
|
||||
OS_VERS := $(shell uname -r)
|
||||
ifeq ($(OS_VERS),5.6)
|
||||
EXTRA_LIBS += $(LIBNLS_LIBDIR)/$(NSCNV_LIBNAME) -lC \
|
||||
$(LIBNLS_LIBDIR)/$(NSJPN_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSCCK_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSSB_LIBNAME)
|
||||
else
|
||||
EXTRA_LIBS += $(LIBNLS_LIBDIR)/$(NSCNV_LIBNAME) -lCrun \
|
||||
$(LIBNLS_LIBDIR)/$(NSJPN_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSCCK_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSSB_LIBNAME)
|
||||
endif
|
||||
else
|
||||
endif
|
||||
EXTRA_LIBS += $(LIBNLS_LIBDIR)/$(NSCNV_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSJPN_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSCCK_LIBNAME) \
|
||||
$(LIBNLS_LIBDIR)/$(NSSB_LIBNAME)
|
||||
endif
|
||||
endif
|
||||
|
||||
LDTOOLS_LIBS += $(EXTRA_LIBS)
|
||||
LIBLOCATION = $(DIST)/$(OBJDIR_NAME)/lib
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
###########################################################################
|
||||
|
||||
all:: $(BINS) $(OBJDEST) linklibnls libdir $(BINS)
|
||||
|
||||
libdir: linklibnls
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
$(NSINSTALL) $(LIBLOCATION)/$(LDAP_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(LIBLOCATION)/$(PRLDAP_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(LIBLOCATION)/$(SSLDAP_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
else
|
||||
$(NSINSTALL) $(LIBLOCATION)/lib$(LDAP_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(LIBLOCATION)/lib$(PRLDAP_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(LIBLOCATION)/lib$(SSLDAP_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
ifeq ($(COMPS_FROM_OBJDIR), 1)
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/$(PLC_BASENAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/$(PLDS_BASENAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/$(NSPR_BASENAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/$(SSL_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/$(NSS_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/$(SOFTOKN_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
else
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/lib$(PLC_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/lib$(PLDS_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/lib$(NSPR_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/lib$(SSL_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/lib$(NSS_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/lib$(SOFTOKN_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(COPYFREEBL), 1)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/lib$(HYBRID_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/$(OBJDIR_NAME)/lib/lib$(PURE32_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
else
|
||||
ifeq ($(OS_ARCH), WINNT)
|
||||
$(NSINSTALL) $(DIST)/lib/$(PLC_BASENAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/lib/$(PLDS_BASENAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/lib/$(NSPR_BASENAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/lib/$(SSL_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/lib/$(NSS_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
$(NSINSTALL) $(DIST)/lib/$(SOFTOKN_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
else
|
||||
$(NSINSTALL) $(DIST)/lib/lib$(PLC_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/lib/lib$(PLDS_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/lib/lib$(NSPR_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/lib/lib$(SSL_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/lib/lib$(NSS_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
ifeq ($(NSS_DYNAMIC_SOFTOKN),1)
|
||||
$(NSINSTALL) $(DIST)/lib/lib$(SOFTOKN_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(COPYFREEBL), 1)
|
||||
$(NSINSTALL) $(DIST)/lib/lib$(HYBRID_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
$(NSINSTALL) $(DIST)/lib/lib$(PURE32_LIBNAME).$(DLL_SUFFIX) $(LIBDIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
linklibnls: FORCE
|
||||
ifneq ($(COMPONENT_PULL_METHOD), FTP)
|
||||
ifeq ($(HAVE_LIBNLS), 1)
|
||||
$(RM) -f $(LIBNLS_INCLUDES)
|
||||
$(RM) -f $(LIBNLS_LIBDIR)
|
||||
ln -s $(LIBNLS_INCLUDES_LOC) $(LIBNLS_INCLUDES)
|
||||
ln -s $(LIBNLS_LIB_LOC) $(LIBNLS_LIBDIR)
|
||||
endif
|
||||
else
|
||||
ifeq ($(HAVE_LIBNLS), 1)
|
||||
@echo "Pulling libnls......"
|
||||
# The following shell script recalculates $(NLS_INCLUDE), $(NLS_LIBPATH) and
|
||||
# $(NLS_VERSION_FILE)
|
||||
sh ../../build/compver.sh $(LIBNLS_DIR) $(LIBNLS_RELDATE) \
|
||||
$(OBJDIR_NAME) ../../../../dist ldapsdk \
|
||||
/share/builds/components/libnls$(NLS_LIBVERSION)/$(LIBNLS_RELDATE)/$(OBJDIR_NAME) \
|
||||
libnls$(NLS_LIBVERSION) \
|
||||
"include lib conv$(NLS_LIBVERSION) locale$(NLS_LIBVERSION)" \
|
||||
../../../../../dist/libnls$(NLS_LIBVERSION)/$(OBJDIR_NAME)/locale$(NLS_LIBVERSION)/index.txt
|
||||
endif
|
||||
endif
|
||||
|
||||
$(LDAPTOOLCOMMON_OBJ):
|
||||
|
||||
ifeq ($(OS_ARCH), HP-UX)
|
||||
$(LDAPTOOLCPPCOMMON_OBJ): convutf8.cpp
|
||||
ifneq ($(USE_64), 1)
|
||||
/opt/aCC/bin/aCC -ext -DHPUX_ACC -D__STDC_EXT__ -D_POSIX_C_SOURCE=199506L -c -DHPUX11 -DHPUX11_00 +DAportable +DS1.1 -D_LARGEFILE64_SOURCE -D_PR_HAVE_OFF64_T -DNO_NODELOCK -DNO_LIBLCACHE -DXP_UNIX -DHPUX -DMCC_HTTPD -DNS_DOMESTIC -DNET_SSL -DCLIENT_AUTH -DNSPR20 -D_PR_NTHREAD -D_PR_USECPU -D_REENTRANT -DNS_DS -DSPAPI20 -DBUILD_NUM=\"01.081.1519\" -DCPU_hppa -DOS_hpux -D_NO_THREADS_ -Dhpux -Dhpux -D_HPUX_SOURCE -D_REENTRANT -Aa -DLDAP_REFERRALS -DLDAP_LDBM -DLDAP_LDIF -DLDBM_USE_DBBTREE -DSLAPD_PASSWD_SHA1 -D__DBINTERFACE_PRIVATE -DNO_LIBLCACHE -DNS_DIRECTORY -DNET_SSL -DUSE_NSPR_MT -O $(INCLUDES) convutf8.cpp -o $(OBJDIR_NAME)/convutf8.o
|
||||
else
|
||||
/opt/aCC/bin/aCC -DHPUX_ACC -D__STDC_EXT__ -D_POSIX_C_SOURCE=199506L +DA2.0W +DS2.0 -c -DHPUX11 -DHPUX11_00 -DIS_64 +e +DA2.0W +DS2.0 -D_LARGEFILE64_SOURCE -D_PR_HAVE_OFF64_T -DNO_NODELOCK -DNO_LIBLCACHE -DXP_UNIX -DHPUX -DMCC_DEBUG -g -DMCC_HTTPD -DNS_DOMESTIC -DNET_SSL -DCLIENT_AUTH -DNSPR20 -D_PR_NTHREAD -D_PR_USECPU -D_REENTRANT -DNS_DS -DSPAPI20 -DBUILD_NUM=\"01.081.1617\" -DCPU_hppa -DOS_hpux -D_NO_THREADS_ -Dhpux -Dhpux -D_HPUX_SOURCE -D_REENTRANT -Aa -DLDAP_DEBUG -DLDAP_REFERRALS -DLDAP_LDBM -DLDAP_LDIF -DLDBM_USE_DBBTREE -DSLAPD_PASSWD_SHA1 -D__DBINTERFACE_PRIVATE -DNO_LIBLCACHE -DNS_DIRECTORY -DNET_SSL -DUSE_NSPR_MT $(INCLUDES) -g convutf8.cpp -o $(OBJDIR_NAME)/convutf8.o
|
||||
endif
|
||||
else
|
||||
$(LDAPTOOLCPPCOMMON_OBJ):
|
||||
|
||||
endif
|
||||
|
||||
$(LDAPCOMPARE): $(LDAPCOMPARE_OBJ) $(LDAPTOOLCOMMON_OBJ) \
|
||||
$(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS_DEP)
|
||||
$(LINK_EXE) $(LDAPCOMPARE_OBJ) $(LDAPTOOLCOMMON_OBJ) $(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS)
|
||||
|
||||
$(LDAPDELETE): $(LDAPDELETE_OBJ) $(LDAPTOOLCOMMON_OBJ) \
|
||||
$(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS_DEP)
|
||||
$(LINK_EXE) $(LDAPDELETE_OBJ) $(LDAPTOOLCOMMON_OBJ) $(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS)
|
||||
|
||||
$(LDAPMODIFY): $(LDAPMODIFY_OBJ) $(LDAPTOOLCOMMON_OBJ) \
|
||||
$(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS_DEP)
|
||||
$(LINK_EXE) $(LDAPMODIFY_OBJ) $(LDAPTOOLCOMMON_OBJ) $(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS)
|
||||
|
||||
$(LDAPSEARCH): $(LDAPSEARCH_OBJ) $(LDAPTOOLCOMMON_OBJ) \
|
||||
$(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS_DEP)
|
||||
$(LINK_EXE) $(LDAPSEARCH_OBJ) $(LDAPTOOLCOMMON_OBJ) $(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS)
|
||||
|
||||
$(LDAPCMP): $(LDAPCMP_OBJ) $(LDAPTOOLCOMMON_OBJ) \
|
||||
$(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS_DEP)
|
||||
$(LINK_EXE) $(LDAPCMP_OBJ) $(LDAPTOOLCOMMON_OBJ) $(LDAPTOOLCPPCOMMON_OBJ) $(LDTOOLS_LIBS)
|
||||
|
||||
$(OBJDEST):
|
||||
$(NSINSTALL) -D $(OBJDEST)
|
||||
$(NSINSTALL) -D $(BINDIR)
|
||||
$(NSINSTALL) -D $(LIBDIR)
|
||||
|
||||
export:: $(OBJDEST) libdir $(BINS)
|
||||
$(NSINSTALL) $(LDAPDELETE) $(INSTALLDIR)
|
||||
$(NSINSTALL) $(LDAPSEARCH) $(INSTALLDIR)
|
||||
$(NSINSTALL) $(LDAPMODIFY) $(INSTALLDIR)
|
||||
$(NSINSTALL) $(LDAPCOMPARE) $(INSTALLDIR)
|
||||
$(NSINSTALL) $(LDAPCMP) $(INSTALLDIR)
|
||||
|
||||
|
||||
#
|
||||
# Simple, local dependencies
|
||||
#
|
||||
LDAPTOOL_COMMON_DEPS = ldaptool.h Makefile
|
||||
$(LDAPTOOLCOMMON_OBJ): $(LDAPTOOL_COMMON_DEPS)
|
||||
$(LDAPDELETE_OBJ): $(LDAPTOOL_COMMON_DEPS)
|
||||
$(LDAPMODIFY_OBJ): $(LDAPTOOL_COMMON_DEPS) fileurl.h
|
||||
$(LDAPSEARCH_OBJ): $(LDAPTOOL_COMMON_DEPS) fileurl.h
|
||||
$(LDAPCOMPARE_OBJ): $(LDAPTOOL_COMMON_DEPS)
|
||||
$(LDAPCMP_OBJ): $(LDAPTOOL_COMMON_DEPS)
|
||||
|
||||
FORCE:
|
||||
@@ -1,59 +0,0 @@
|
||||
Summary of options used by the LDAP tools
|
||||
|
||||
Updated 5-May-2000 by Mark Smith <mcs@netscape.com>
|
||||
|
||||
|
||||
Only single letter options in the sets [0-9], [A-Z], and [a-z] are
|
||||
listed.
|
||||
|
||||
The "raw" lists are taken from the calls to getopt() and
|
||||
ldaptool_process_args().
|
||||
|
||||
The "sorted" lists are just that -- sorted versions of the raw list.
|
||||
|
||||
The "all" lists include options from common.c as well as the tool-specific
|
||||
options.
|
||||
|
||||
The "avail" lists included options that are available for use.
|
||||
|
||||
|
||||
common.c (supported by all of the tools):
|
||||
raw: nvEMRHZ0d:D:f:h:I:j:K:N:O:P:p:Q:W:w:V:X:m:i:k:y:Y:
|
||||
sorted: 0 DEHIKMNOPQRVWXYZ dfhikmnpvwy
|
||||
avail: [2-9] J g (not used by any of the tools)
|
||||
|
||||
ldapcmp.c:
|
||||
raw: Bb:l:s:z:
|
||||
sorted: B blsz
|
||||
all: 0 BDHIKMNOPQRVWXYZ bdfhiklmnpsvwyz
|
||||
avail: [1-9] ACFGJLSTU acegjoqrtu
|
||||
|
||||
ldapcompare.c:
|
||||
raw: cq
|
||||
sorted: cq
|
||||
all: 0 DEHIKMNOPQRVWXYZ cdfhikmnpqvwy
|
||||
avail: [1-9] ABCFJLSTU abegjlorstuxz
|
||||
|
||||
ldapdelete.c (deprecated)
|
||||
raw: c
|
||||
sorted: c
|
||||
all: 0 DHIKMNOPQRVWXYZ cdfhikmnpvwy
|
||||
avail: [1-9] ABCFGJLSTU abegjloqrstuxz
|
||||
|
||||
ldapmodify.c
|
||||
raw: aAbcFe:B:q
|
||||
sorted: ABF abceq
|
||||
all: 0 ABDFHIKMNOPQRVWXYZ abcdefhikmnpqvwy
|
||||
avail: [1-9] CGJLSTU gjlorstuxz
|
||||
|
||||
ldapmodrdn.c (deprecated)
|
||||
raw: cr
|
||||
sorted: cr
|
||||
all: 0 DHIKMNOPQRVWXYZ cdfhikmnprvwy
|
||||
avail: [1-9] ABCFGJLSTU abegjloqstuxz
|
||||
|
||||
ldapsearch.c
|
||||
raw: ABLTU1eotuxa:b:F:G:l:S:s:z:C:
|
||||
sorted: 1 ABCFGLSTU abeostuxz
|
||||
all: 01 ABCDFGHIKLMNOPQRSTUVWXYZ abdefhikmnopstuvwxyz
|
||||
avail: [2-9] J cgjlqr
|
||||
@@ -1,162 +0,0 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/******************************************************
|
||||
*
|
||||
* argpin.c - Returns pin for token specified in a
|
||||
* command line paramenter.
|
||||
*
|
||||
******************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "argpin.h"
|
||||
|
||||
struct SVRCOREArgPinObj
|
||||
{
|
||||
SVRCOREPinObj base;
|
||||
|
||||
char *tokenName;
|
||||
char *password;
|
||||
SVRCOREPinObj *alt;
|
||||
};
|
||||
static const struct SVRCOREPinMethods vtable;
|
||||
|
||||
/* XXXceb these are two hacks to fix a problem with the debug builds
|
||||
* of svrcore. With the optimizer turned off, there is a situation
|
||||
* in user.c, where these two functions need to be available for the
|
||||
* linker (they are imported, and no lib exports them, since they are
|
||||
* declared static on XP_UNIX platforms) The short term hack solution
|
||||
* is to define them here. Yeah, it is ugly but, it will need to be
|
||||
* here, until a new version of svrcore is done.
|
||||
*/
|
||||
|
||||
|
||||
void echoOff(int fd)
|
||||
{
|
||||
}
|
||||
|
||||
void echoOn(int fd)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
SVRCOREError
|
||||
SVRCORE_CreateArgPinObj(SVRCOREArgPinObj **out, const char * tokenName, const char *password, SVRCOREPinObj *pinObj)
|
||||
{
|
||||
SVRCOREError err = 0;
|
||||
SVRCOREArgPinObj *obj = 0;
|
||||
|
||||
do {
|
||||
obj = (SVRCOREArgPinObj*)malloc(sizeof (SVRCOREArgPinObj));
|
||||
if (!obj) { err = 1; break; }
|
||||
|
||||
obj->base.methods = &vtable;
|
||||
obj->tokenName=NULL;
|
||||
obj->password=NULL;
|
||||
obj->alt=pinObj;
|
||||
|
||||
if ( tokenName == NULL) {
|
||||
PK11SlotInfo *slot = PK11_GetInternalKeySlot();
|
||||
|
||||
obj->tokenName = strdup(PK11_GetTokenName(slot));
|
||||
PK11_FreeSlot(slot);
|
||||
}
|
||||
else
|
||||
{
|
||||
obj->tokenName = strdup(tokenName);
|
||||
}
|
||||
if (obj->tokenName == NULL) { err = 1; break; }
|
||||
|
||||
obj->password = strdup(password);
|
||||
if (obj->password == NULL) { err = 1; break; }
|
||||
} while(0);
|
||||
|
||||
if (err)
|
||||
{
|
||||
SVRCORE_DestroyArgPinObj(obj);
|
||||
obj = 0;
|
||||
}
|
||||
|
||||
*out = obj;
|
||||
return err;
|
||||
}
|
||||
|
||||
void
|
||||
SVRCORE_DestroyArgPinObj(SVRCOREArgPinObj *obj)
|
||||
{
|
||||
if (obj->tokenName) free(obj->tokenName);
|
||||
if (obj->password)
|
||||
{
|
||||
memset(obj->password, 0, strlen(obj->password));
|
||||
free(obj->password);
|
||||
}
|
||||
if (obj) free(obj);
|
||||
}
|
||||
|
||||
static void destroyObject(SVRCOREPinObj *obj)
|
||||
{
|
||||
SVRCORE_DestroyArgPinObj((SVRCOREArgPinObj*)obj);
|
||||
}
|
||||
|
||||
static char *getPin(SVRCOREPinObj *obj, const char *tokenName, PRBool retry)
|
||||
{
|
||||
SVRCOREArgPinObj *p = (SVRCOREArgPinObj*)obj;
|
||||
|
||||
if (tokenName == NULL) return NULL;
|
||||
|
||||
/* On first attempt, return the password if the token name
|
||||
* matches.
|
||||
*/
|
||||
if (!retry && strcmp(p->tokenName, tokenName) == 0)
|
||||
{
|
||||
return strdup(p->password);
|
||||
}
|
||||
|
||||
if (p->alt != NULL) return SVRCORE_GetPin(p->alt, tokenName, retry);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* VTable
|
||||
*/
|
||||
static const SVRCOREPinMethods vtable =
|
||||
{ 0, 0, destroyObject, getPin };
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef __ARGPIN_H__
|
||||
#define __ARGPIN_H__
|
||||
|
||||
#include <svrcore.h>
|
||||
|
||||
typedef struct SVRCOREArgPinObj SVRCOREArgPinObj;
|
||||
|
||||
SVRCOREError
|
||||
SVRCORE_CreateArgPinObj(SVRCOREArgPinObj **out, const char * tokenName, const char *password, SVRCOREPinObj *pinObj);
|
||||
|
||||
void
|
||||
SVRCORE_DestroyArgPinObj(SVRCOREArgPinObj *obj);
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,613 +0,0 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef HAVE_LIBNLS
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern char *ldaptool_charset;
|
||||
char *ldaptool_convdir = NULL;
|
||||
static int charsetset = 0;
|
||||
char *ldaptool_local2UTF8( const char *src );
|
||||
|
||||
char *
|
||||
ldaptool_local2UTF8( const char *src )
|
||||
{
|
||||
char *utf8;
|
||||
|
||||
charsetset = 0;
|
||||
|
||||
if (src == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
utf8 = strdup(src);
|
||||
|
||||
return ( utf8 );
|
||||
}
|
||||
|
||||
#else /* HAVE_LIBNLS */
|
||||
|
||||
#define NSPR20
|
||||
|
||||
#ifdef XP_WIN32
|
||||
#define VC_EXTRALEAN
|
||||
#include <afxwin.h>
|
||||
#include <winnls.h>
|
||||
#endif
|
||||
|
||||
extern char *ldaptool_charset;
|
||||
static int charsetset = 0;
|
||||
|
||||
extern "C" {
|
||||
char *ldaptool_convdir = NULL;
|
||||
char *ldaptool_local2UTF8( const char * );
|
||||
}
|
||||
|
||||
#ifndef XP_WIN32
|
||||
char * GetNormalizedLocaleName(void);
|
||||
|
||||
#include "unistring.h"
|
||||
#include "nlsenc.h"
|
||||
|
||||
extern NLS_StaticConverterRegistry _STATICLINK_NSJPN_;
|
||||
extern NLS_StaticConverterRegistry _STATICLINK_NSCCK_;
|
||||
extern NLS_StaticConverterRegistry _STATICLINK_NSSB_;
|
||||
|
||||
char *
|
||||
GetNormalizedLocaleName(void)
|
||||
{
|
||||
#ifdef _HPUX_SOURCE
|
||||
|
||||
int len;
|
||||
char *locale;
|
||||
|
||||
locale = setlocale(LC_CTYPE, "");
|
||||
if (locale && *locale) {
|
||||
len = strlen(locale);
|
||||
} else {
|
||||
locale = "C";
|
||||
len = 1;
|
||||
}
|
||||
|
||||
if ((!strncmp(locale, "/\x03:", 3)) &&
|
||||
(!strcmp(&locale[len - 2], ";/"))) {
|
||||
locale += 3;
|
||||
len -= 5;
|
||||
}
|
||||
|
||||
locale = strdup(locale);
|
||||
if (locale) {
|
||||
locale[len] = 0;
|
||||
}
|
||||
|
||||
return locale;
|
||||
|
||||
#else
|
||||
|
||||
char *locale;
|
||||
|
||||
locale = setlocale(LC_CTYPE, "");
|
||||
if (locale && *locale) {
|
||||
return strdup(locale);
|
||||
}
|
||||
|
||||
return strdup("C");
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(IRIX)
|
||||
const char *CHARCONVTABLE[] =
|
||||
{
|
||||
"! This table maps the host's locale names to LIBNLS charsets",
|
||||
"!",
|
||||
"C: ISO_8859-1:1987",
|
||||
"cs: ISO_8859-2:1987",
|
||||
"da: ISO_8859-1:1987",
|
||||
"de: ISO_8859-1:1987",
|
||||
"de_AT: ISO_8859-1:1987",
|
||||
"de_CH: ISO_8859-1:1987",
|
||||
"en: ISO_8859-1:1987",
|
||||
"en_AU: ISO_8859-1:1987",
|
||||
"en_CA: ISO_8859-1:1987",
|
||||
"en_TH: ISO_8859-1:1987",
|
||||
"en_US: ISO_8859-1:1987",
|
||||
"es: ISO_8859-1:1987",
|
||||
"fi: ISO_8859-1:1987",
|
||||
"fr: ISO_8859-1:1987",
|
||||
"fr_BE: ISO_8859-1:1987",
|
||||
"fr_CA: ISO_8859-1:1987",
|
||||
"fr_CH: ISO_8859-1:1987",
|
||||
"is: ISO_8859-1:1987",
|
||||
"it: ISO_8859-1:1987",
|
||||
"it_CH: ISO_8859-1:1987",
|
||||
"ja_JP.EUC: Extended_UNIX_Code_Packed_Format_for_Japanese",
|
||||
"ko_KR.euc: EUC-KR",
|
||||
"nl: ISO_8859-1:1987",
|
||||
"nl_BE: ISO_8859-1:1987",
|
||||
"no: ISO_8859-1:1987",
|
||||
"pl: ISO_8859-2:1987",
|
||||
"pt: ISO_8859-1:1987",
|
||||
"sh: ISO_8859-2:1987",
|
||||
"sk: ISO_8859-2:1987",
|
||||
"sv: ISO_8859-1:1987",
|
||||
"zh_CN.ugb: GB2312",
|
||||
"zh_TW.ucns: cns11643_1",
|
||||
NULL
|
||||
};
|
||||
#elif defined(SOLARIS)
|
||||
const char *CHARCONVTABLE[] =
|
||||
{
|
||||
"! This table maps the host's locale names to LIBNLS charsets",
|
||||
"!",
|
||||
"C: ISO_8859-1:1987",
|
||||
"ja: Extended_UNIX_Code_Packed_Format_for_Japanese",
|
||||
"ja_JP.EUC: Extended_UNIX_Code_Packed_Format_for_Japanese",
|
||||
"ja_JP.PCK: Shift_JIS",
|
||||
"en: ISO_8859-1:1987",
|
||||
"en_AU: ISO_8859-1:1987",
|
||||
"en_CA: ISO_8859-1:1987",
|
||||
"en_UK: ISO_8859-1:1987",
|
||||
"en_US: ISO_8859-1:1987",
|
||||
"es: ISO_8859-1:1987",
|
||||
"es_AR: ISO_8859-1:1987",
|
||||
"es_BO: ISO_8859-1:1987",
|
||||
"es_CL: ISO_8859-1:1987",
|
||||
"es_CO: ISO_8859-1:1987",
|
||||
"es_CR: ISO_8859-1:1987",
|
||||
"es_EC: ISO_8859-1:1987",
|
||||
"es_GT: ISO_8859-1:1987",
|
||||
"es_MX: ISO_8859-1:1987",
|
||||
"es_NI: ISO_8859-1:1987",
|
||||
"es_PA: ISO_8859-1:1987",
|
||||
"es_PE: ISO_8859-1:1987",
|
||||
"es_PY: ISO_8859-1:1987",
|
||||
"es_SV: ISO_8859-1:1987",
|
||||
"es_UY: ISO_8859-1:1987",
|
||||
"es_VE: ISO_8859-1:1987",
|
||||
"fr: ISO_8859-1:1987",
|
||||
"fr_BE: ISO_8859-1:1987",
|
||||
"fr_CA: ISO_8859-1:1987",
|
||||
"fr_CH: ISO_8859-1:1987",
|
||||
"de: ISO_8859-1:1987",
|
||||
"de_AT: ISO_8859-1:1987",
|
||||
"de_CH: ISO_8859-1:1987",
|
||||
"nl: ISO_8859-1:1987",
|
||||
"nl_BE: ISO_8859-1:1987",
|
||||
"it: ISO_8859-1:1987",
|
||||
"sv: ISO_8859-1:1987",
|
||||
"no: ISO_8859-1:1987",
|
||||
"da: ISO_8859-1:1987",
|
||||
"iso_8859_1: ISO_8859-1:1987",
|
||||
"japanese: Extended_UNIX_Code_Packed_Format_for_Japanese",
|
||||
"ko: EUC-KR",
|
||||
"zh: GB2312",
|
||||
"zh_TW: cns11643_1",
|
||||
NULL
|
||||
};
|
||||
#elif defined(OSF1)
|
||||
const char *CHARCONVTABLE[] =
|
||||
{
|
||||
"! This table maps the host's locale names to LIBNLS charsets",
|
||||
"!",
|
||||
"C: ISO_8859-1:1987",
|
||||
"cs_CZ.ISO8859-2: ISO_8859-2:1987",
|
||||
"cs_CZ: ISO_8859-2:1987",
|
||||
"da_DK.ISO8859-1: ISO_8859-1:1987",
|
||||
"de_CH.ISO8859-1: ISO_8859-1:1987",
|
||||
"de_DE.ISO8859-1: ISO_8859-1:1987",
|
||||
"en_GB.ISO8859-1: ISO_8859-1:1987",
|
||||
"en_US.ISO8859-1: ISO_8859-1:1987",
|
||||
"es_ES.ISO8859-1: ISO_8859-1:1987",
|
||||
"fi_FI.ISO8859-1: ISO_8859-1:1987",
|
||||
"fr_BE.ISO8859-1: ISO_8859-1:1987",
|
||||
"fr_CA.ISO8859-1: ISO_8859-1:1987",
|
||||
"fr_CH.ISO8859-1: ISO_8859-1:1987",
|
||||
"fr_FR.ISO8859-1: ISO_8859-1:1987",
|
||||
"hu_HU.ISO8859-2: ISO_8859-2:1987",
|
||||
"hu_HU: ISO_8859-2:1987",
|
||||
"is_IS.ISO8859-1: ISO_8859-1:1987",
|
||||
"it_IT.ISO8859-1: ISO_8859-1:1987",
|
||||
"ja_JP.SJIS: Shift_JIS",
|
||||
"ja_JP.eucJP: Extended_UNIX_Code_Packed_Format_for_Japanese",
|
||||
"ja_JP: Extended_UNIX_Code_Packed_Format_for_Japanese",
|
||||
"ko_KR.eucKR: EUC-KR",
|
||||
"ko_KR: EUC-KR",
|
||||
"nl_BE.ISO8859-1: ISO_8859-1:1987",
|
||||
"nl_NL.ISO8859-1: ISO_8859-1:1987",
|
||||
"no_NO.ISO8859-1: ISO_8859-1:1987",
|
||||
"pl_PL.ISO8859-2: ISO_8859-2:1987",
|
||||
"pl_PL: ISO_8859-2:1987",
|
||||
"pt_PT.ISO8859-1: ISO_8859-1:1987",
|
||||
"sk_SK.ISO8859-2: ISO_8859-2:1987",
|
||||
"sk_SK: ISO_8859-2:1987",
|
||||
"sv_SE.ISO8859-1: ISO_8859-1:1987",
|
||||
"zh_CN: GB2312",
|
||||
"zh_HK.big5: Big5",
|
||||
"zh_HK.eucTW: cns11643_1",
|
||||
"zh_TW.big5: Big5",
|
||||
"zh_TW.big5@chuyin: Big5",
|
||||
"zh_TW.big5@radical: Big5",
|
||||
"zh_TW.big5@stroke: Big5",
|
||||
"zh_TW.eucTW: cns11643_1",
|
||||
"zh_TW.eucTW@chuyin: cns11643_1",
|
||||
"zh_TW.eucTW@radical: cns11643_1",
|
||||
"zh_TW.eucTW@stroke: cns11643_1",
|
||||
"zh_TW: cns11643_1",
|
||||
NULL
|
||||
};
|
||||
#elif defined(HPUX)
|
||||
const char *CHARCONVTABLE[] =
|
||||
{
|
||||
"! This table maps the host's locale names to LIBNLS charsets",
|
||||
"!",
|
||||
"C: ISO_8859-1:1987",
|
||||
"ja_JP: Extended_UNIX_Code_Packed_Format_for_Japanese",
|
||||
"ja_JP.SJIS: Shift_JIS",
|
||||
"ja_JP.eucJP: Extended_UNIX_Code_Packed_Format_for_Japanese",
|
||||
"es_ES: ISO_8859-1:1987",
|
||||
"es_ES.iso88591: ISO_8859-1:1987",
|
||||
"sv_SE: ISO_8859-1:1987",
|
||||
"sv_SE.iso88591: ISO_8859-1:1987",
|
||||
"da_DK: ISO_8859-1:1987",
|
||||
"da_DK.iso88591: ISO_8859-1:1987",
|
||||
"nl_NL: ISO_8859-1:1987",
|
||||
"nl_NL.iso88591: ISO_8859-1:1987",
|
||||
"en: ISO_8859-1:1987",
|
||||
"en_GB: ISO_8859-1:1987",
|
||||
"en_GB.iso88591: ISO_8859-1:1987",
|
||||
"en_US: ISO_8859-1:1987",
|
||||
"en_US.iso88591: ISO_8859-1:1987",
|
||||
"fi_FI: ISO_8859-1:1987",
|
||||
"fi_FI.iso88591: ISO_8859-1:1987",
|
||||
"fr_CA: ISO_8859-1:1987",
|
||||
"fr_CA.iso88591: ISO_8859-1:1987",
|
||||
"fr_FR: ISO_8859-1:1987",
|
||||
"fr_FR.iso88591: ISO_8859-1:1987",
|
||||
"de_DE: ISO_8859-1:1987",
|
||||
"de_DE.iso88591: ISO_8859-1:1987",
|
||||
"is_IS: ISO_8859-1:1987",
|
||||
"is_IS.iso88591: ISO_8859-1:1987",
|
||||
"it_IT: ISO_8859-1:1987",
|
||||
"it_IT.iso88591: ISO_8859-1:1987",
|
||||
"no_NO: ISO_8859-1:1987",
|
||||
"no_NO.iso88591: ISO_8859-1:1987",
|
||||
"pt_PT: ISO_8859-1:1987",
|
||||
"pt_PT.iso88591: ISO_8859-1:1987",
|
||||
"hu_HU: ISO_8859-2:1987",
|
||||
"hu_HU.iso88592: ISO_8859-2:1987",
|
||||
"cs_CZ: ISO_8859-2:1987",
|
||||
"cs_CZ.iso88592: ISO_8859-2:1987",
|
||||
"pl_PL: ISO_8859-2:1987",
|
||||
"pl_PL.iso88592: ISO_8859-2:1987",
|
||||
"ro_RO: ISO_8859-2:1987",
|
||||
"ro_RO.iso88592: ISO_8859-2:1987",
|
||||
"hr_HR: ISO_8859-2:1987",
|
||||
"hr_HR.iso88592: ISO_8859-2:1987",
|
||||
"sk_SK: ISO_8859-2:1987",
|
||||
"sk_SK.iso88592: ISO_8859-2:1987",
|
||||
"sl_SI: ISO_8859-2:1987",
|
||||
"sl_SI.iso88592: ISO_8859-2:1987",
|
||||
"american.iso88591: ISO_8859-1:1987",
|
||||
"bulgarian: ISO_8859-2:1987",
|
||||
"c-french.iso88591: ISO_8859-1:1987",
|
||||
"chinese-s: GB2312",
|
||||
"chinese-t.big5: Big5",
|
||||
"czech: ISO_8859-2:1987",
|
||||
"danish.iso88591: ISO_8859-1:1987",
|
||||
"dutch.iso88591: ISO_8859-1:1987",
|
||||
"english.iso88591: ISO_8859-1:1987",
|
||||
"finnish.iso88591: ISO_8859-1:1987",
|
||||
"french.iso88591: ISO_8859-1:1987",
|
||||
"german.iso88591: ISO_8859-1:1987",
|
||||
"hungarian: ISO_8859-2:1987",
|
||||
"icelandic.iso88591: ISO_8859-1:1987",
|
||||
"italian.iso88591: ISO_8859-1:1987",
|
||||
"japanese.euc: Extended_UNIX_Code_Packed_Format_for_Japanese",
|
||||
"japanese: Shift_JIS",
|
||||
"katakana: Shift_JIS",
|
||||
"korean: EUC-KR",
|
||||
"norwegian.iso88591: ISO_8859-1:1987",
|
||||
"polish: ISO_8859-2:1987",
|
||||
"portuguese.iso88591: ISO_8859-1:1987",
|
||||
"rumanian: ISO_8859-2:1987",
|
||||
"serbocroatian: ISO_8859-2:1987",
|
||||
"slovene: ISO_8859-2:1987",
|
||||
"spanish.iso88591: ISO_8859-1:1987",
|
||||
"swedish.iso88591: ISO_8859-1:1987",
|
||||
NULL
|
||||
};
|
||||
#elif defined(AIX)
|
||||
const char *CHARCONVTABLE[] =
|
||||
{
|
||||
"! This table maps the host's locale names to LIBNLS charsets",
|
||||
"!",
|
||||
"C: ISO_8859-1:1987",
|
||||
"En_JP.IBM-932: Shift_JIS",
|
||||
"En_JP: Shift_JIS",
|
||||
"Ja_JP.IBM-932: Shift_JIS",
|
||||
"Ja_JP: Shift_JIS",
|
||||
"da_DK.ISO8859-1: ISO_8859-1:1987",
|
||||
"da_DK: ISO_8859-1:1987",
|
||||
"de_CH.ISO8859-1: ISO_8859-1:1987",
|
||||
"de_CH: ISO_8859-1:1987",
|
||||
"de_DE.ISO8859-1: ISO_8859-1:1987",
|
||||
"de_DE: ISO_8859-1:1987",
|
||||
"en_GB.ISO8859-1: ISO_8859-1:1987",
|
||||
"en_GB: ISO_8859-1:1987",
|
||||
"en_JP.IBM-eucJP: Extended_UNIX_Code_Packed_Format_for_Japanese",
|
||||
"en_JP: Extended_UNIX_Code_Packed_Format_for_Japanese",
|
||||
"en_KR.IBM-eucKR: EUC-KR",
|
||||
"en_KR: EUC-KR",
|
||||
"en_TW.IBM-eucTW: cns11643_1",
|
||||
"en_TW: cns11643_1",
|
||||
"en_US.ISO8859-1: ISO_8859-1:1987",
|
||||
"en_US: ISO_8859-1:1987",
|
||||
"es_ES.ISO8859-1: ISO_8859-1:1987",
|
||||
"es_ES: ISO_8859-1:1987",
|
||||
"fi_FI.ISO8859-1: ISO_8859-1:1987",
|
||||
"fi_FI: ISO_8859-1:1987",
|
||||
"fr_BE.ISO8859-1: ISO_8859-1:1987",
|
||||
"fr_BE: ISO_8859-1:1987",
|
||||
"fr_CA.ISO8859-1: ISO_8859-1:1987",
|
||||
"fr_CA: ISO_8859-1:1987",
|
||||
"fr_CH.ISO8859-1: ISO_8859-1:1987",
|
||||
"fr_CH: ISO_8859-1:1987",
|
||||
"fr_FR.ISO8859-1: ISO_8859-1:1987",
|
||||
"fr_FR: ISO_8859-1:1987",
|
||||
"is_IS.ISO8859-1: ISO_8859-1:1987",
|
||||
"is_IS: ISO_8859-1:1987",
|
||||
"it_IT.ISO8859-1: ISO_8859-1:1987",
|
||||
"it_IT: ISO_8859-1:1987",
|
||||
"ja_JP.IBM-eucJP: Extended_UNIX_Code_Packed_Format_for_Japanese",
|
||||
"ja_JP: Extended_UNIX_Code_Packed_Format_for_Japanese",
|
||||
"ko_KR.IBM-eucKR: EUC-KR",
|
||||
"ko_KR: EUC-KR",
|
||||
"nl_BE.ISO8859-1: ISO_8859-1:1987",
|
||||
"nl_BE: ISO_8859-1:1987",
|
||||
"nl_NL.ISO8859-1: ISO_8859-1:1987",
|
||||
"nl_NL: ISO_8859-1:1987",
|
||||
"no_NO.ISO8859-1: ISO_8859-1:1987",
|
||||
"no_NO: ISO_8859-1:1987",
|
||||
"pt_PT.ISO8859-1: ISO_8859-1:1987",
|
||||
"pt_PT: ISO_8859-1:1987",
|
||||
"sv_SE.ISO8859-1: ISO_8859-1:1987",
|
||||
"sv_SE: ISO_8859-1:1987",
|
||||
"zh_TW.IBM-eucTW: cns11643_1",
|
||||
"zh_TW: cns11643_1",
|
||||
NULL
|
||||
};
|
||||
#else // sunos by default
|
||||
const char *CHARCONVTABLE[] =
|
||||
{
|
||||
"! This table maps the host's locale names to LIBNLS charsets",
|
||||
"!",
|
||||
"C: ISO_8859-1:1987",
|
||||
"de: ISO_8859-1:1987",
|
||||
"en_US: ISO_8859-1:1987",
|
||||
"es: ISO_8859-1:1987",
|
||||
"fr: ISO_8859-1:1987",
|
||||
"iso_8859_1: ISO_8859-1:1987",
|
||||
"it: ISO_8859-1:1987",
|
||||
"ja: Extended_UNIX_Code_Packed_Format_for_Japanese",
|
||||
"ja_JP.EUC: Extended_UNIX_Code_Packed_Format_for_Japanese",
|
||||
"japanese: Extended_UNIX_Code_Packed_Format_for_Japanese",
|
||||
"ko: EUC-KR",
|
||||
"sv: ISO_8859-1:1987",
|
||||
"zh: GB2312",
|
||||
"zh_TW: cns11643_1",
|
||||
NULL
|
||||
};
|
||||
#endif
|
||||
|
||||
#define BSZ 256
|
||||
|
||||
char *
|
||||
GetCharsetFromLocale(char *locale)
|
||||
{
|
||||
char *tmpcharset = NULL;
|
||||
char buf[BSZ];
|
||||
char *p;
|
||||
const char *line;
|
||||
int i=0;
|
||||
|
||||
line = CHARCONVTABLE[i];
|
||||
while (line != NULL)
|
||||
{
|
||||
if (*line == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
strcpy(buf, line);
|
||||
line = CHARCONVTABLE[++i];
|
||||
|
||||
if (!*buf || *buf == '!')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
p = strchr(buf, ':');
|
||||
if (p == NULL)
|
||||
{
|
||||
tmpcharset = NULL;
|
||||
break;
|
||||
}
|
||||
*p = 0;
|
||||
if (strcmp(buf, locale) == 0) {
|
||||
while (*++p == ' ' || *p == '\t')
|
||||
;
|
||||
if (isalpha(*p)) {
|
||||
tmpcharset = strdup(p);
|
||||
} else
|
||||
tmpcharset = NULL;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
return tmpcharset;
|
||||
}
|
||||
|
||||
#endif /* Not defined XP_WIN32 */
|
||||
|
||||
#ifdef XP_WIN32
|
||||
char *_convertor(const char *instr, int bFromUTF8)
|
||||
{
|
||||
char *outstr = NULL;
|
||||
int inlen, wclen, outlen;
|
||||
LPWSTR wcstr;
|
||||
|
||||
if (instr == NULL)
|
||||
return NULL;
|
||||
|
||||
if ((inlen = strlen(instr)) <= 0)
|
||||
return NULL;
|
||||
|
||||
/* output never becomes longer than input,
|
||||
** thus we don't have to ask for the length
|
||||
*/
|
||||
wcstr = (LPWSTR) malloc( sizeof( WCHAR ) * (inlen+1) );
|
||||
if (!wcstr)
|
||||
return NULL;
|
||||
|
||||
wclen = MultiByteToWideChar(bFromUTF8 ? CP_UTF8 : CP_ACP, 0, instr,
|
||||
inlen, wcstr, inlen);
|
||||
outlen = WideCharToMultiByte(bFromUTF8 ? CP_ACP : CP_UTF8, 0, wcstr,
|
||||
wclen, NULL, 0, NULL, NULL);
|
||||
|
||||
if (outlen > 0) {
|
||||
outstr = (char *) malloc(outlen + 2);
|
||||
outlen = WideCharToMultiByte(bFromUTF8 ? CP_ACP : CP_UTF8, 0, wcstr,
|
||||
wclen, outstr, outlen, NULL, NULL);
|
||||
if (outlen > 0)
|
||||
*(outstr+outlen) = _T('\0');
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
free( wcstr );
|
||||
return outstr;
|
||||
}
|
||||
#endif
|
||||
|
||||
char *
|
||||
ldaptool_local2UTF8( const char *src )
|
||||
{
|
||||
char *utf8;
|
||||
#ifndef XP_WIN32
|
||||
char *locale, *newcharset;
|
||||
size_t outLen, resultLen;
|
||||
NLS_ErrorCode err;
|
||||
|
||||
if (src == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
else if (*src == 0)
|
||||
{
|
||||
utf8 = strdup(src);
|
||||
return utf8;
|
||||
}
|
||||
|
||||
if( (ldaptool_charset != NULL) && (!strcmp( ldaptool_charset, "" ))
|
||||
&& (!charsetset) )
|
||||
{
|
||||
locale = GetNormalizedLocaleName();
|
||||
ldaptool_charset = GetCharsetFromLocale(locale);
|
||||
free( locale );
|
||||
charsetset = 1;
|
||||
}
|
||||
else
|
||||
if( (ldaptool_charset != NULL) && strcmp( ldaptool_charset, "" )
|
||||
&& (!charsetset) )
|
||||
{
|
||||
newcharset = GetCharsetFromLocale( ldaptool_charset );
|
||||
free( ldaptool_charset );
|
||||
ldaptool_charset = newcharset;
|
||||
charsetset = 1;
|
||||
}
|
||||
|
||||
if (ldaptool_charset == NULL) {
|
||||
return strdup(src);
|
||||
}
|
||||
|
||||
if (NLS_EncInitialize(NULL, ldaptool_convdir) != NLS_SUCCESS ||
|
||||
NLS_RegisterStaticLibrary(_STATICLINK_NSJPN_) != NLS_SUCCESS ||
|
||||
NLS_RegisterStaticLibrary(_STATICLINK_NSCCK_) != NLS_SUCCESS ||
|
||||
NLS_RegisterStaticLibrary(_STATICLINK_NSSB_) != NLS_SUCCESS) {
|
||||
return strdup(src);
|
||||
}
|
||||
|
||||
outLen = NLS_GetResultBufferSize( (byte *) src,
|
||||
strlen( src ) * sizeof(char),
|
||||
ldaptool_charset,
|
||||
NLS_ENCODING_UTF_8 );
|
||||
|
||||
utf8 = (char *) malloc( outLen/sizeof(UniChar) );
|
||||
if( utf8 == NULL )
|
||||
return strdup(src);
|
||||
|
||||
err = NLS_ConvertBuffer( ldaptool_charset,
|
||||
NLS_ENCODING_UTF_8,
|
||||
(byte*)src,
|
||||
strlen(src) * sizeof(char),
|
||||
(byte*)utf8,
|
||||
outLen,
|
||||
&resultLen );
|
||||
|
||||
NLS_EncTerminate();
|
||||
|
||||
#else
|
||||
utf8 = _convertor(src, FALSE);
|
||||
if( utf8 == NULL )
|
||||
utf8 = strdup(src);
|
||||
#endif
|
||||
|
||||
return utf8;
|
||||
}
|
||||
#endif /* HAVE_LIBNLS */
|
||||
|
||||
#ifndef HAVE_LIBNLS
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,181 +0,0 @@
|
||||
# LDIF examples, taken from the specification which was found at:
|
||||
# http://www.ietf.org/internet-drafts/draft-good-ldap-ldif-03.txt
|
||||
|
||||
# Example 1: An simple LDAP file with two entries
|
||||
version: 1
|
||||
dn: cn=Barbara Jensen, ou=Product Development, dc=airius, dc=com
|
||||
objectclass: top
|
||||
objectclass: person
|
||||
objectclass: organizationalPerson
|
||||
cn: Barbara Jensen
|
||||
cn: Barbara J Jensen
|
||||
cn: Babs Jensen
|
||||
sn: Jensen
|
||||
uid: bjensen
|
||||
telephonenumber: +1 408 555 1212
|
||||
description: A big sailing fan.
|
||||
|
||||
dn: cn=Bjorn Jensen, ou=Accounting, dc=airius, dc=com
|
||||
objectclass: top
|
||||
objectclass: person
|
||||
objectclass: organizationalPerson
|
||||
cn: Bjorn Jensen
|
||||
sn: Jensen
|
||||
telephonenumber: +1 408 555 1212
|
||||
|
||||
# Example 2: A file containing an entry with a folded attribute value
|
||||
version: 1
|
||||
dn:cn=Barbara Jensen, ou=Product Development, dc=airius, dc=com
|
||||
objectclass:top
|
||||
objectclass:person
|
||||
objectclass:organizationalPerson
|
||||
cn:Barbara Jensen
|
||||
cn:Barbara J Jensen
|
||||
cn:Babs Jensen
|
||||
sn:Jensen
|
||||
uid:bjensen
|
||||
telephonenumber:+1 408 555 1212
|
||||
description:Babs is a big sailing fan, and travels extensively in search of
|
||||
perfect sailing conditions.
|
||||
title:Product Manager, Rod and Reel Division
|
||||
|
||||
# Example 3: A file containing a base-64-encoded value
|
||||
version: 1
|
||||
dn: cn=Gern Jensen, ou=Product Testing, dc=airius, dc=com
|
||||
objectclass: top
|
||||
objectclass: person
|
||||
objectclass: organizationalPerson
|
||||
cn: Gern Jensen
|
||||
cn: Gern O Jensen
|
||||
sn: Jensen
|
||||
uid: gernj
|
||||
telephonenumber: +1 408 555 1212
|
||||
description:: V2hhdCBhIGNhcmVmdWwgcmVhZGVyIHlvdSBhcmUhICBUaGlzIHZhbHVlIGlzIGJ
|
||||
hc2UtNjQtZW5jb2RlZCBiZWNhdXNlIGl0IGhhcyBhIGNvbnRyb2wgY2hhcmFjdGVyIGluIGl0ICh
|
||||
hIENSKS4NICBCeSB0aGUgd2F5LCB5b3Ugc2hvdWxkIHJlYWxseSBnZXQgb3V0IG1vcmUu
|
||||
|
||||
# Example 4: A file containing an entries with UTF-8-encoded attribute
|
||||
# values, including language tags. Comments indicate the contents
|
||||
# of UTF-8-encoded attributes and distinguished names.
|
||||
version: 1
|
||||
dn:: b3U95Za25qWt6YOoLG89QWlyaXVz
|
||||
# dn:: ou=<JapaneseOU>,o=Airius
|
||||
objectclass: top
|
||||
objectclass: organizationalUnit
|
||||
ou:: 5Za25qWt6YOo
|
||||
# ou:: <JapaneseOU>
|
||||
ou;lang-ja:: 5Za25qWt6YOo
|
||||
# ou;lang-ja:: <JapaneseOU>
|
||||
ou;lang-ja;phonetic:: 44GI44GE44GO44KH44GG44G2
|
||||
# ou;lang-ja:: <JapaneseOU_in_phonetic_representation>
|
||||
ou;lang-en: Sales
|
||||
description: Japanese office
|
||||
|
||||
dn:: dWlkPXJvZ2FzYXdhcmEsb3U95Za25qWt6YOoLG89QWlyaXVz
|
||||
# dn:: uid=<uid>,ou=<JapaneseOU>,o=Airius
|
||||
userpassword: {SHA}O3HSv1MusyL4kTjP+HKI5uxuNoM=
|
||||
objectclass: top
|
||||
objectclass: person
|
||||
objectclass: organizationalPerson
|
||||
objectclass: inetOrgPerson
|
||||
uid: rogasawara
|
||||
mail: rogasawara@airius.co.jp
|
||||
givenname;lang-ja:: 44Ot44OJ44OL44O8
|
||||
# givenname;lang-ja:: <JapaneseGivenname>
|
||||
sn;lang-ja:: 5bCP56yg5Y6f
|
||||
# sn;lang-ja:: <JapaneseSn>
|
||||
cn;lang-ja:: 5bCP56yg5Y6fIOODreODieODi+ODvA==
|
||||
# cn;lang-ja:: <JapaneseCn>
|
||||
title;lang-ja:: 5Za25qWt6YOoIOmDqOmVtw==
|
||||
# title;lang-ja:: <JapaneseTitle>
|
||||
preferredlanguage: ja
|
||||
givenname:: 44Ot44OJ44OL44O8
|
||||
# givenname:: <JapaneseGivenname>
|
||||
sn:: 5bCP56yg5Y6f
|
||||
# sn:: <JapaneseSn>
|
||||
cn:: 5bCP56yg5Y6fIOODreODieODi+ODvA==
|
||||
# cn:: <JapaneseCn>
|
||||
title:: 5Za25qWt6YOoIOmDqOmVtw==
|
||||
# title:: <JapaneseTitle>
|
||||
givenname;lang-ja;phonetic:: 44KN44Gp44Gr44O8
|
||||
# givenname;lang-ja;phonetic:: <JapaneseGivenname_in_phonetic_representation_kana>
|
||||
sn;lang-ja;phonetic:: 44GK44GM44GV44KP44KJ
|
||||
# sn;lang-ja;phonetic:: <JapaneseSn_in_phonetic_representation_kana>
|
||||
cn;lang-ja;phonetic:: 44GK44GM44GV44KP44KJIOOCjeOBqeOBq+ODvA==
|
||||
# cn;lang-ja;phonetic:: <JapaneseCn_in_phonetic_representation_kana>
|
||||
title;lang-ja;phonetic:: 44GI44GE44GO44KH44GG44G2IOOBtuOBoeOCh+OBhg==
|
||||
# title;lang-ja;phonetic:: <JapaneseTitle_in_phonetic_representation_kana>
|
||||
givenname;lang-en: Rodney
|
||||
sn;lang-en: Ogasawara
|
||||
cn;lang-en: Rodney Ogasawara
|
||||
title;lang-en: Sales, Director
|
||||
|
||||
# Example 5: A file containing a reference to an external file
|
||||
version: 1
|
||||
dn: cn=Horatio Jensen, ou=Product Testing, dc=airius, dc=com
|
||||
objectclass: top
|
||||
objectclass: person
|
||||
objectclass: organizationalPerson
|
||||
cn: Horatio Jensen
|
||||
cn: Horatio N Jensen
|
||||
sn: Jensen
|
||||
uid: hjensen
|
||||
telephonenumber: +1 408 555 1212
|
||||
# XXXmcs: In the spec, the following line reads:
|
||||
# jpegphoto:< file:///usr/local/directory/photos/hjensen.jpg
|
||||
# I changed the file URL to point to a more generic directory.
|
||||
jpegphoto:< file:///tmp/hjensen.jpg
|
||||
|
||||
# Example 6: A file containing a series of change records and comments
|
||||
version: 1
|
||||
# Add a new entry
|
||||
dn: cn=Fiona Jensen, ou=Marketing, dc=airius, dc=com
|
||||
changetype: add
|
||||
objectclass: top
|
||||
objectclass: person
|
||||
objectclass: organizationalPerson
|
||||
cn: Fiona Jensen
|
||||
sn: Jensen
|
||||
uid: fiona
|
||||
telephonenumber: +1 408 555 1212
|
||||
# XXXmcs: In the spec, the following line reads:
|
||||
# jpegphoto:< file:///usr/local/directory/photos/fiona.jpg
|
||||
# I changed the file URL to point to a more generic directory.
|
||||
jpegphoto:< file:///tmp/fiona.jpg
|
||||
|
||||
# Delete an existing entry
|
||||
dn: cn=Robert Jensen, ou=Marketing, dc=airius, dc=com
|
||||
changetype: delete
|
||||
|
||||
# Modify an entry's relative distinguished name
|
||||
dn: cn=Paul Jensen, ou=Product Development, dc=airius, dc=com
|
||||
changetype: modrdn
|
||||
newrdn: cn=Paula Jensen
|
||||
deleteoldrdn: 1
|
||||
|
||||
# Rename an entry and move all of its children to a new location in
|
||||
# the directory tree (only implemented by LDAPv3 servers).
|
||||
dn: ou=PD Accountants, ou=Product Development, dc=airius, dc=com
|
||||
changetype: modrdn
|
||||
newrdn: ou=Product Development Accountants
|
||||
deleteoldrdn: 0
|
||||
newsuperior: ou=Accounting, dc=airius, dc=com
|
||||
|
||||
# Modify an entry: add an additional value to the postaladdress attribute,
|
||||
# completely delete the description attribute, replace the telephonenumber
|
||||
# attribute with two values, and delete a specific value from the
|
||||
# facsimiletelephonenumber attribute
|
||||
dn: cn=Paula Jensen, ou=Product Development, dc=airius, dc=com
|
||||
changetype: modify
|
||||
add: postaladdress
|
||||
postaladdress: 123 Anystreet $ Sunnyvale, CA $ 94086
|
||||
-
|
||||
delete: description
|
||||
-
|
||||
replace: telephonenumber
|
||||
telephonenumber: +1 408 555 1234
|
||||
telephonenumber: +1 408 555 5678
|
||||
-
|
||||
delete: facsimiletelephonenumber
|
||||
facsimiletelephonenumber: +1 408 555 9876
|
||||
-
|
||||
@@ -1,506 +0,0 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
* LDAP tools fileurl.c -- functions for handling file URLs.
|
||||
* Used by ldapmodify.
|
||||
*/
|
||||
|
||||
#include "ldaptool.h"
|
||||
#include "fileurl.h"
|
||||
#include <ctype.h> /* for isalpha() */
|
||||
|
||||
static int str_starts_with( const char *s, char *prefix );
|
||||
static void hex_unescape( char *s );
|
||||
static int unhex( char c );
|
||||
static void strcpy_escaped_and_convert( char *s1, char *s2 );
|
||||
static int berval_from_file( const char *path, struct berval *bvp,
|
||||
int reporterrs );
|
||||
|
||||
/*
|
||||
* Convert a file URL to a local path.
|
||||
*
|
||||
* If successful, LDAPTOOL_FILEURL_SUCCESS is returned and *localpathp is
|
||||
* set point to an allocated string. If not, an different LDAPTOOL_FILEURL_
|
||||
* error code is returned.
|
||||
*
|
||||
* See RFCs 1738 and 2396 for a specification for file URLs... but
|
||||
* Netscape Navigator seems to be a bit more lenient in what it will
|
||||
* accept, especially on Windows).
|
||||
*
|
||||
* This function parses file URLs of these three forms:
|
||||
*
|
||||
* file:///path
|
||||
* file:/path
|
||||
* file://localhost/path
|
||||
* file://host/path (rejected with a ...NONLOCAL error)
|
||||
*
|
||||
* On Windows, we convert leading drive letters of the form C| to C:
|
||||
* and if a drive letter is present we strip off the slash that precedes
|
||||
* path. Otherwise, the leading slash is returned.
|
||||
*
|
||||
*/
|
||||
int
|
||||
ldaptool_fileurl2path( const char *fileurl, char **localpathp )
|
||||
{
|
||||
const char *path;
|
||||
char *pathcopy;
|
||||
|
||||
/*
|
||||
* Make sure this is a file URL we can handle.
|
||||
*/
|
||||
if ( !str_starts_with( fileurl, "file:" )) {
|
||||
return( LDAPTOOL_FILEURL_NOTAFILEURL );
|
||||
}
|
||||
|
||||
path = fileurl + 5; /* skip past "file:" scheme prefix */
|
||||
|
||||
if ( *path != '/' ) {
|
||||
return( LDAPTOOL_FILEURL_MISSINGPATH );
|
||||
}
|
||||
|
||||
++path; /* skip past '/' at end of "file:/" */
|
||||
|
||||
if ( *path == '/' ) {
|
||||
++path; /* remainder is now host/path or /path */
|
||||
if ( *path != '/' ) {
|
||||
/*
|
||||
* Make sure it is for the local host.
|
||||
*/
|
||||
if ( str_starts_with( path, "localhost/" )) {
|
||||
path += 9;
|
||||
} else {
|
||||
return( LDAPTOOL_FILEURL_NONLOCAL );
|
||||
}
|
||||
}
|
||||
} else { /* URL is of the form file:/path */
|
||||
--path;
|
||||
}
|
||||
|
||||
/*
|
||||
* The remainder is now of the form /path. On Windows, skip past the
|
||||
* leading slash if a drive letter is present.
|
||||
*/
|
||||
#ifdef _WINDOWS
|
||||
if ( isalpha( path[1] ) && ( path[2] == '|' || path[2] == ':' )) {
|
||||
++path;
|
||||
}
|
||||
#endif /* _WINDOWS */
|
||||
|
||||
/*
|
||||
* Duplicate the path so we can safely alter it.
|
||||
* Unescape any %HH sequences.
|
||||
*/
|
||||
if (( pathcopy = strdup( path )) == NULL ) {
|
||||
return( LDAPTOOL_FILEURL_NOMEMORY );
|
||||
}
|
||||
hex_unescape( pathcopy );
|
||||
|
||||
#ifdef _WINDOWS
|
||||
/*
|
||||
* Convert forward slashes to backslashes for Windows. Also,
|
||||
* if we see a drive letter / vertical bar combination (e.g., c|)
|
||||
* at the beginning of the path, replace the '|' with a ':'.
|
||||
*/
|
||||
{
|
||||
char *p;
|
||||
|
||||
for ( p = pathcopy; *p != '\0'; ++p ) {
|
||||
if ( *p == '/' ) {
|
||||
*p = '\\';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( isalpha( pathcopy[0] ) && pathcopy[1] == '|' ) {
|
||||
pathcopy[1] = ':';
|
||||
}
|
||||
#endif /* _WINDOWS */
|
||||
|
||||
*localpathp = pathcopy;
|
||||
return( LDAPTOOL_FILEURL_SUCCESS );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Convert a local path to a file URL.
|
||||
*
|
||||
* If successful, LDAPTOOL_FILEURL_SUCCESS is returned and *urlp is
|
||||
* set point to an allocated string. If not, an different LDAPTOOL_FILEURL_
|
||||
* error code is returned. At present, the only possible error is
|
||||
* LDAPTOOL_FILEURL_NOMEMORY.
|
||||
*
|
||||
* This function produces file URLs of the form file:path.
|
||||
*
|
||||
* On Windows, we convert leading drive letters to C|.
|
||||
*
|
||||
*/
|
||||
int
|
||||
ldaptool_path2fileurl( char *path, char **urlp )
|
||||
{
|
||||
char *p, *url, *prefix ="file:";
|
||||
|
||||
if ( NULL == path ) {
|
||||
path = "/";
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate space for the URL, taking into account that path may
|
||||
* expand during the hex escaping process.
|
||||
*/
|
||||
if (( url = malloc( strlen( prefix ) + 3 * strlen( path ) + 1 )) == NULL ) {
|
||||
return( LDAPTOOL_FILEURL_NOMEMORY );
|
||||
}
|
||||
|
||||
strcpy( url, prefix );
|
||||
p = url + strlen( prefix );
|
||||
|
||||
#ifdef _WINDOWS
|
||||
/*
|
||||
* On Windows, convert leading drive letters (e.g., C:) to the correct URL
|
||||
* syntax (e.g., C|).
|
||||
*/
|
||||
if ( isalpha( path[0] ) && path[1] == ':' ) {
|
||||
*p++ = path[0];
|
||||
*p++ = '|';
|
||||
path += 2;
|
||||
*p = '\0';
|
||||
}
|
||||
#endif /* _WINDOWS */
|
||||
|
||||
/*
|
||||
* Append the path, encoding any URL-special characters using the %HH
|
||||
* convention.
|
||||
* On Windows, convert backwards slashes in the path to forward ones.
|
||||
*/
|
||||
strcpy_escaped_and_convert( p, path );
|
||||
|
||||
*urlp = url;
|
||||
return( LDAPTOOL_FILEURL_SUCCESS );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Populate *bvp from "value" of length "vlen."
|
||||
*
|
||||
* If recognize_url_syntax is non-zero, :<fileurl is recognized.
|
||||
* If always_try_file is recognized and no file URL was found, an
|
||||
* attempt is made to stat and read the value as if it were the name
|
||||
* of a file.
|
||||
*
|
||||
* If reporterrs is non-zero, specific error messages are printed to
|
||||
* stderr.
|
||||
*
|
||||
* If successful, LDAPTOOL_FILEURL_SUCCESS is returned and bvp->bv_len
|
||||
* and bvp->bv_val are set (the latter is set to malloc'd memory).
|
||||
* Upon failure, a different LDAPTOOL_FILEURL_ error code is returned.
|
||||
*/
|
||||
int
|
||||
ldaptool_berval_from_ldif_value( const char *value, int vlen,
|
||||
struct berval *bvp, int recognize_url_syntax, int always_try_file,
|
||||
int reporterrs )
|
||||
{
|
||||
int rc = LDAPTOOL_FILEURL_SUCCESS; /* optimistic */
|
||||
struct stat fstats;
|
||||
|
||||
/* recognize "attr :< url" syntax if LDIF version is >= 1 */
|
||||
|
||||
if ( recognize_url_syntax && *value == '<' ) {
|
||||
const char *url;
|
||||
char *path;
|
||||
|
||||
for ( url = value + 1; isspace( *url ); ++url ) {
|
||||
; /* NULL */
|
||||
}
|
||||
|
||||
if (strlen(url) > 7 && strncasecmp(url, "file://", 7) == 0) {
|
||||
/*
|
||||
* We only support file:// URLs for now.
|
||||
*/
|
||||
rc = ldaptool_fileurl2path( url, &path );
|
||||
switch( rc ) {
|
||||
case LDAPTOOL_FILEURL_NOTAFILEURL:
|
||||
if ( reporterrs ) fprintf( stderr, "%s: unsupported URL \"%s\";"
|
||||
" use a file:// URL instead.\n", ldaptool_progname, url );
|
||||
break;
|
||||
|
||||
case LDAPTOOL_FILEURL_MISSINGPATH:
|
||||
if ( reporterrs ) fprintf( stderr,
|
||||
"%s: unable to process URL \"%s\" --"
|
||||
" missing path.\n", ldaptool_progname, url );
|
||||
break;
|
||||
|
||||
case LDAPTOOL_FILEURL_NONLOCAL:
|
||||
if ( reporterrs ) fprintf( stderr,
|
||||
"%s: unable to process URL \"%s\" -- only"
|
||||
" local file:// URLs are supported.\n",
|
||||
ldaptool_progname, url );
|
||||
break;
|
||||
|
||||
case LDAPTOOL_FILEURL_NOMEMORY:
|
||||
if ( reporterrs ) perror( "ldaptool_fileurl2path" );
|
||||
break;
|
||||
|
||||
case LDAPTOOL_FILEURL_SUCCESS:
|
||||
if ( stat( path, &fstats ) != 0 ) {
|
||||
if ( reporterrs ) perror( path );
|
||||
} else if ( fstats.st_mode & S_IFDIR ) {
|
||||
if ( reporterrs ) fprintf( stderr,
|
||||
"%s: %s is a directory, not a file\n",
|
||||
ldaptool_progname, path );
|
||||
rc = LDAPTOOL_FILEURL_FILEIOERROR;
|
||||
} else {
|
||||
rc = berval_from_file( path, bvp, reporterrs );
|
||||
}
|
||||
free( path );
|
||||
break;
|
||||
|
||||
default:
|
||||
if ( reporterrs ) fprintf( stderr,
|
||||
"%s: unable to process URL \"%s\""
|
||||
" -- unknown error\n", ldaptool_progname, url );
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( always_try_file && (stat( value, &fstats ) == 0) &&
|
||||
!(fstats.st_mode & S_IFDIR)) { /* get value from file */
|
||||
rc = berval_from_file( value, bvp, reporterrs );
|
||||
} else {
|
||||
bvp->bv_len = vlen;
|
||||
if (( bvp->bv_val = (char *)malloc( vlen + 1 )) == NULL ) {
|
||||
if ( reporterrs ) perror( "malloc" );
|
||||
rc = LDAPTOOL_FILEURL_NOMEMORY;
|
||||
} else {
|
||||
SAFEMEMCPY( bvp->bv_val, value, vlen );
|
||||
bvp->bv_val[ vlen ] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
return( rc );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Map an LDAPTOOL_FILEURL_ error code to an LDAP error code (crude).
|
||||
*/
|
||||
int
|
||||
ldaptool_fileurlerr2ldaperr( int lderr )
|
||||
{
|
||||
int rc;
|
||||
|
||||
switch( lderr ) {
|
||||
case LDAPTOOL_FILEURL_SUCCESS:
|
||||
rc = LDAP_SUCCESS;
|
||||
break;
|
||||
case LDAPTOOL_FILEURL_NOMEMORY:
|
||||
rc = LDAP_NO_MEMORY;
|
||||
break;
|
||||
default:
|
||||
rc = LDAP_PARAM_ERROR;
|
||||
}
|
||||
|
||||
return( rc );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Populate *bvp with the contents of the file named by "path".
|
||||
*
|
||||
* If reporterrs is non-zero, specific error messages are printed to
|
||||
* stderr.
|
||||
*
|
||||
* If successful, LDAPTOOL_FILEURL_SUCCESS is returned and bvp->bv_len
|
||||
* and bvp->bv_val are set (the latter is set to malloc'd memory).
|
||||
* Upon failure, a different LDAPTOOL_FILEURL_ error code is returned.
|
||||
*/
|
||||
|
||||
static int
|
||||
berval_from_file( const char *path, struct berval *bvp, int reporterrs )
|
||||
{
|
||||
FILE *fp;
|
||||
long rlen;
|
||||
int eof;
|
||||
#if defined( XP_WIN32 )
|
||||
char mode[20] = "r+b";
|
||||
#else
|
||||
char mode[20] = "r";
|
||||
#endif
|
||||
|
||||
if (( fp = fopen( path, mode )) == NULL ) {
|
||||
if ( reporterrs ) perror( path );
|
||||
return( LDAPTOOL_FILEURL_FILEIOERROR );
|
||||
}
|
||||
|
||||
if ( fseek( fp, 0L, SEEK_END ) != 0 ) {
|
||||
if ( reporterrs ) perror( path );
|
||||
fclose( fp );
|
||||
return( LDAPTOOL_FILEURL_FILEIOERROR );
|
||||
}
|
||||
|
||||
bvp->bv_len = ftell( fp );
|
||||
|
||||
if (( bvp->bv_val = (char *)malloc( bvp->bv_len + 1 )) == NULL ) {
|
||||
if ( reporterrs ) perror( "malloc" );
|
||||
fclose( fp );
|
||||
return( LDAPTOOL_FILEURL_NOMEMORY );
|
||||
}
|
||||
|
||||
if ( fseek( fp, 0L, SEEK_SET ) != 0 ) {
|
||||
if ( reporterrs ) perror( path );
|
||||
fclose( fp );
|
||||
return( LDAPTOOL_FILEURL_FILEIOERROR );
|
||||
}
|
||||
|
||||
rlen = fread( bvp->bv_val, 1, bvp->bv_len, fp );
|
||||
eof = feof( fp );
|
||||
fclose( fp );
|
||||
|
||||
if ( rlen != (long)bvp->bv_len ) {
|
||||
if ( reporterrs ) perror( path );
|
||||
free( bvp->bv_val );
|
||||
return( LDAPTOOL_FILEURL_FILEIOERROR );
|
||||
}
|
||||
|
||||
bvp->bv_val[ bvp->bv_len ] = '\0';
|
||||
return( LDAPTOOL_FILEURL_SUCCESS );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Return a non-zero value if the string s begins with prefix and zero if not.
|
||||
*/
|
||||
static int
|
||||
str_starts_with( const char *s, char *prefix )
|
||||
{
|
||||
size_t prefix_len;
|
||||
|
||||
if ( s == NULL || prefix == NULL ) {
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
prefix_len = strlen( prefix );
|
||||
if ( strlen( s ) < prefix_len ) {
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
return( strncmp( s, prefix, prefix_len ) == 0 );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Remove URL hex escapes from s... done in place. The basic concept for
|
||||
* this routine is borrowed from the WWW library HTUnEscape() routine.
|
||||
*
|
||||
* A similar function called nsldapi_hex_unescape can be found in
|
||||
* ../../libraries/libldap/unescape.c
|
||||
*/
|
||||
static void
|
||||
hex_unescape( char *s )
|
||||
{
|
||||
char *p;
|
||||
|
||||
for ( p = s; *s != '\0'; ++s ) {
|
||||
if ( *s == '%' ) {
|
||||
if ( *++s != '\0' ) {
|
||||
*p = unhex( *s ) << 4;
|
||||
}
|
||||
if ( *++s != '\0' ) {
|
||||
*p++ += unhex( *s );
|
||||
}
|
||||
} else {
|
||||
*p++ = *s;
|
||||
}
|
||||
}
|
||||
|
||||
*p = '\0';
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Return the integer equivalent of one hex digit (in c).
|
||||
*
|
||||
* A similar function can be found in ../../libraries/libldap/unescape.c
|
||||
*/
|
||||
static int
|
||||
unhex( char c )
|
||||
{
|
||||
return( c >= '0' && c <= '9' ? c - '0'
|
||||
: c >= 'A' && c <= 'F' ? c - 'A' + 10
|
||||
: c - 'a' + 10 );
|
||||
}
|
||||
|
||||
|
||||
#define HREF_CHAR_ACCEPTABLE( c ) (( c >= '-' && c <= '9' ) || \
|
||||
( c >= '@' && c <= 'Z' ) || \
|
||||
( c == '_' ) || \
|
||||
( c >= 'a' && c <= 'z' ))
|
||||
|
||||
/*
|
||||
* Like strcat(), except if any URL-special characters are found in s2
|
||||
* they are escaped using the %HH convention and backslash characters are
|
||||
* converted to forward slashes on Windows.
|
||||
*
|
||||
* Maximum space needed in s1 is 3 * strlen( s2 ) + 1.
|
||||
*
|
||||
* A similar function that does not convert the slashes called
|
||||
* strcat_escaped() can be found in ../../libraries/libldap/tmplout.c
|
||||
*/
|
||||
static void
|
||||
strcpy_escaped_and_convert( char *s1, char *s2 )
|
||||
{
|
||||
char *p, *q;
|
||||
char *hexdig = "0123456789ABCDEF";
|
||||
|
||||
p = s1 + strlen( s1 );
|
||||
for ( q = s2; *q != '\0'; ++q ) {
|
||||
#ifdef _WINDOWS
|
||||
if ( *q == '\\' ) {
|
||||
*p++ = '/';
|
||||
} else
|
||||
#endif /* _WINDOWS */
|
||||
|
||||
if ( HREF_CHAR_ACCEPTABLE( *q )) {
|
||||
*p++ = *q;
|
||||
} else {
|
||||
*p++ = '%';
|
||||
*p++ = hexdig[ 0x0F & ((*(unsigned char*)q) >> 4) ];
|
||||
*p++ = hexdig[ 0x0F & *q ];
|
||||
}
|
||||
}
|
||||
|
||||
*p = '\0';
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
* LDAP tools fileurl.h -- defines for file URL functions.
|
||||
* Used by ldapmodify.
|
||||
*/
|
||||
|
||||
/*
|
||||
* ldaptool_fileurl2path() convert a file URL to a local path.
|
||||
*
|
||||
* If successful, LDAPTOOL_FILEURL_SUCCESS is returned and *localpathp is
|
||||
* set point to an allocated string. If not, a different LDAPTOOL_FILEURL_
|
||||
* error code is returned.
|
||||
*/
|
||||
int ldaptool_fileurl2path( const char *fileurl, char **localpathp );
|
||||
|
||||
|
||||
/*
|
||||
* Convert a local path to a file URL.
|
||||
*
|
||||
* If successful, LDAPTOOL_FILEURL_SUCCESS is returned and *urlp is
|
||||
* set point to an allocated string. If not, a different LDAPTOOL_FILEURL_
|
||||
* error code is returned. At present, the only possible error is
|
||||
* LDAPTOOL_FILEURL_NOMEMORY.
|
||||
*
|
||||
*/
|
||||
int ldaptool_path2fileurl( char *path, char **urlp );
|
||||
|
||||
|
||||
/*
|
||||
* Populate *bvp from "value" of length "vlen."
|
||||
*
|
||||
* If recognize_url_syntax is non-zero, :<fileurl is recognized.
|
||||
* If always_try_file is recognized and no file URL was found, an
|
||||
* attempt is made to stat and read the value as if it were the name
|
||||
* of a file.
|
||||
*
|
||||
* If reporterrs is non-zero, specific error messages are printed to
|
||||
* stderr.
|
||||
*
|
||||
* If successful, LDAPTOOL_FILEURL_SUCCESS is returned and bvp->bv_len
|
||||
* and bvp->bv_val are set (the latter is set to malloc'd memory).
|
||||
* Upon failure, a different LDAPTOOL_FILEURL_ error code is returned.
|
||||
*/
|
||||
int ldaptool_berval_from_ldif_value( const char *value, int vlen,
|
||||
struct berval *bvp, int recognize_url_syntax, int always_try_file,
|
||||
int reporterrs );
|
||||
|
||||
|
||||
/*
|
||||
* Map an LDAPTOOL_FILEURL_ error code to an LDAP error code (crude).
|
||||
*/
|
||||
int ldaptool_fileurlerr2ldaperr( int lderr );
|
||||
|
||||
|
||||
/*
|
||||
* Possible return codes for the functions declared in this file:
|
||||
*/
|
||||
#define LDAPTOOL_FILEURL_SUCCESS 0
|
||||
#define LDAPTOOL_FILEURL_NOTAFILEURL 1
|
||||
#define LDAPTOOL_FILEURL_MISSINGPATH 2
|
||||
#define LDAPTOOL_FILEURL_NONLOCAL 3
|
||||
#define LDAPTOOL_FILEURL_NOMEMORY 4
|
||||
#define LDAPTOOL_FILEURL_FILEIOERROR 5
|
||||
@@ -1,618 +0,0 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* tool to compare the contents of two LDAP directory subtrees */
|
||||
|
||||
#include "ldaptool.h"
|
||||
|
||||
typedef struct attr {
|
||||
char *name;
|
||||
char **vals;
|
||||
struct attr *next;
|
||||
} ATTR; /* used for comparing two entries */
|
||||
|
||||
static void options_callback( int option, char *optarg );
|
||||
static int docompare( LDAP *ld1, LDAP *ld2, char *base );
|
||||
static int cmp2(LDAP *ld1, LDAP *ld2, LDAPMessage *e1, int findonly );
|
||||
static void notfound(char *base, int dbaseno);
|
||||
ATTR* get_attrs( LDAP *ld, LDAPMessage *e );
|
||||
char* cmp_attrs( ATTR *a1, ATTR *a2 );
|
||||
static void attr_free(ATTR *at);
|
||||
#if 0 /* these functions are not used */
|
||||
static void print_entry( LDAP *ld, LDAPMessage *entry, int attrsonly );
|
||||
static void print_dn( LDAP *ld, LDAPMessage *entry );
|
||||
static int write_ldif_value( char *type, char *value, unsigned long vallen );
|
||||
#endif /* 0 */
|
||||
|
||||
static void
|
||||
usage( void )
|
||||
{
|
||||
fprintf( stderr,
|
||||
"usage: %s -b basedn [options] [attributes...]\nwhere:\n",
|
||||
ldaptool_progname );
|
||||
fprintf( stderr, " basedn\tbase dn for search\n" );
|
||||
fprintf( stderr, "\t\t(if the environment variable LDAP_BASEDN is set,\n" );
|
||||
fprintf( stderr, "\t\tthen the -b flag is not required)\n" );
|
||||
fprintf( stderr, "options:\n" );
|
||||
fprintf( stderr, " -s scope\tone of base, one, or sub (default is sub)\n" );
|
||||
ldaptool_common_usage( 1 );
|
||||
exit( LDAP_PARAM_ERROR );
|
||||
}
|
||||
|
||||
static char *base = NULL;
|
||||
static int allow_binary, vals2tmp, ldif, scope, deref, differ=0;
|
||||
static int attrsonly, timelimit, sizelimit;
|
||||
#if 0 /* these statics are referenced only by unused functions */
|
||||
static char *sep = LDAPTOOL_DEFSEP;
|
||||
static char **sortattr = NULL;
|
||||
static int *skipsortattr = NULL;
|
||||
static int includeufn;
|
||||
#endif /* 0 */
|
||||
|
||||
|
||||
int
|
||||
main( int argc, char **argv )
|
||||
{
|
||||
int rc, optind;
|
||||
LDAP *ld1, *ld2;
|
||||
|
||||
#ifdef notdef
|
||||
#ifdef HPUX11
|
||||
#ifndef __LP64__
|
||||
_main( argc, argv);
|
||||
#endif /* __LP64_ */
|
||||
#endif /* HPUX11 */
|
||||
#endif
|
||||
|
||||
deref = LDAP_DEREF_NEVER;
|
||||
allow_binary = vals2tmp = attrsonly = 0;
|
||||
ldif = 1;
|
||||
sizelimit = timelimit = 0;
|
||||
scope = LDAP_SCOPE_SUBTREE;
|
||||
|
||||
optind = ldaptool_process_args( argc, argv, "Bb:l:s:z:", 0,
|
||||
options_callback );
|
||||
|
||||
if ( optind == -1 ) {
|
||||
usage();
|
||||
}
|
||||
|
||||
if ( base == NULL ) {
|
||||
if (( base = getenv( "LDAP_BASEDN" )) == NULL ) {
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
ld1 = ldaptool_ldap_init( 0 );
|
||||
|
||||
ldap_set_option( ld1, LDAP_OPT_DEREF, &deref );
|
||||
ldap_set_option( ld1, LDAP_OPT_TIMELIMIT, &timelimit );
|
||||
ldap_set_option( ld1, LDAP_OPT_SIZELIMIT, &sizelimit );
|
||||
|
||||
ldaptool_bind( ld1 );
|
||||
|
||||
ld2 = ldaptool_ldap_init( 1 );
|
||||
|
||||
ldap_set_option( ld2, LDAP_OPT_DEREF, &deref );
|
||||
ldap_set_option( ld2, LDAP_OPT_TIMELIMIT, &timelimit );
|
||||
ldap_set_option( ld2, LDAP_OPT_SIZELIMIT, &sizelimit );
|
||||
|
||||
ldaptool_bind( ld2 );
|
||||
if ( ldaptool_verbose ) {
|
||||
printf( "Connections to servers established. Beginning comparison.\n" );
|
||||
}
|
||||
|
||||
rc = docompare( ld1, ld2, base );
|
||||
|
||||
ldaptool_cleanup( ld1 );
|
||||
ldaptool_cleanup( ld2 );
|
||||
if ( ldaptool_verbose && !rc ) {
|
||||
if ( !differ ) {
|
||||
printf( "compare completed: no differences found\n" );
|
||||
} else {
|
||||
printf( "compare completed: ****differences were found****\n" );
|
||||
}
|
||||
}
|
||||
return( rc );
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
options_callback( int option, char *optarg )
|
||||
{
|
||||
switch( option ) {
|
||||
case 'B': /* allow binary values to be printed, even if -o used */
|
||||
++allow_binary;
|
||||
break;
|
||||
case 's': /* search scope */
|
||||
if ( strncasecmp( optarg, "base", 4 ) == 0 ) {
|
||||
scope = LDAP_SCOPE_BASE;
|
||||
} else if ( strncasecmp( optarg, "one", 3 ) == 0 ) {
|
||||
scope = LDAP_SCOPE_ONELEVEL;
|
||||
} else if ( strncasecmp( optarg, "sub", 3 ) == 0 ) {
|
||||
scope = LDAP_SCOPE_SUBTREE;
|
||||
} else {
|
||||
fprintf( stderr, "scope should be base, one, or sub\n" );
|
||||
usage();
|
||||
}
|
||||
break;
|
||||
case 'b': /* searchbase */
|
||||
base = strdup( optarg );
|
||||
break;
|
||||
case 'l': /* time limit */
|
||||
timelimit = atoi( optarg );
|
||||
break;
|
||||
case 'z': /* size limit */
|
||||
sizelimit = atoi( optarg );
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Returns an LDAP error code.
|
||||
*/
|
||||
static int
|
||||
docompare( LDAP *ld1, LDAP *ld2, char *base )
|
||||
{
|
||||
int rc, msgid;
|
||||
LDAPMessage *res, *e;
|
||||
LDAPControl *ctrls[2], **serverctrls;
|
||||
|
||||
if ( ldaptool_verbose ) {
|
||||
printf( "Base: %s\n\n", base );
|
||||
}
|
||||
if ( ldaptool_not ) {
|
||||
return( LDAP_SUCCESS );
|
||||
}
|
||||
|
||||
if (( ctrls[0] = ldaptool_create_manage_dsait_control()) != NULL ) {
|
||||
ctrls[1] = NULL;
|
||||
serverctrls = ctrls;
|
||||
} else {
|
||||
serverctrls = NULL;
|
||||
}
|
||||
|
||||
if ( ldap_search_ext( ld1, base, scope, "objectClass=*", NULL,
|
||||
0, serverctrls, NULL, NULL, -1, &msgid ) != LDAP_SUCCESS ) {
|
||||
return( ldaptool_print_lderror( ld1, "ldap_search",
|
||||
LDAPTOOL_CHECK4SSL_IF_APPROP ));
|
||||
}
|
||||
/* XXXmcs: this code should be modified to display referrals and references */
|
||||
while ( (rc = ldap_result( ld1, LDAP_RES_ANY, 0, NULL, &res )) ==
|
||||
LDAP_RES_SEARCH_ENTRY ) {
|
||||
e = ldap_first_entry( ld1, res );
|
||||
rc = cmp2( ld1, ld2, e , 0);
|
||||
ldap_msgfree( res );
|
||||
}
|
||||
if ( rc == -1 ) {
|
||||
return( ldaptool_print_lderror( ld1, "ldap_result",
|
||||
LDAPTOOL_CHECK4SSL_IF_APPROP ));
|
||||
}
|
||||
if (( rc = ldap_result2error( ld1, res, 0 )) != LDAP_SUCCESS ) {
|
||||
ldaptool_print_lderror( ld1, "ldap_search",
|
||||
LDAPTOOL_CHECK4SSL_IF_APPROP );
|
||||
}
|
||||
ldap_msgfree( res );
|
||||
|
||||
if ( ldap_search_ext( ld2, base, scope, "objectClass=*", NULL,
|
||||
0, serverctrls, NULL, NULL, -1, &msgid ) == -1 ) {
|
||||
return( ldaptool_print_lderror( ld2, "ldap_search",
|
||||
LDAPTOOL_CHECK4SSL_IF_APPROP ));
|
||||
}
|
||||
/* XXXmcs: this code should be modified to display referrals and references */
|
||||
while ( (rc = ldap_result( ld2, LDAP_RES_ANY, 0, NULL, &res )) ==
|
||||
LDAP_RES_SEARCH_ENTRY ) {
|
||||
e = ldap_first_entry( ld2, res );
|
||||
rc = cmp2( ld2, ld1, e , 1);
|
||||
ldap_msgfree( res );
|
||||
}
|
||||
if ( rc == -1 ) {
|
||||
return( ldaptool_print_lderror( ld2, "ldap_result",
|
||||
LDAPTOOL_CHECK4SSL_IF_APPROP ));
|
||||
}
|
||||
if (( rc = ldap_result2error( ld1, res, 0 )) != LDAP_SUCCESS ) {
|
||||
ldaptool_print_lderror( ld1, "ldap_search",
|
||||
LDAPTOOL_CHECK4SSL_IF_APPROP );
|
||||
}
|
||||
ldap_msgfree( res );
|
||||
|
||||
return( rc );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Returns an LDAP error code.
|
||||
*/
|
||||
static int
|
||||
cmp2( LDAP *ld1, LDAP *ld2, LDAPMessage *e1, int findonly)
|
||||
{
|
||||
LDAPMessage *e2, *res;
|
||||
char *dn, *attrcmp;
|
||||
int found=0, rc, msgid;
|
||||
ATTR *a1, *a2;
|
||||
|
||||
dn = ldap_get_dn( ld1, e1 );
|
||||
|
||||
if ( ldaptool_verbose ) {
|
||||
if ( findonly ) {
|
||||
printf( "Checking that %s exists on both servers\n", dn );
|
||||
} else {
|
||||
printf("Comparing entry %s on both servers\n", dn );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ldap_search( ld2, dn, LDAP_SCOPE_BASE, "objectClass=*", NULL, 0 ) == -1 ) {
|
||||
return( ldaptool_print_lderror( ld2, "ldap_search",
|
||||
LDAPTOOL_CHECK4SSL_IF_APPROP ));
|
||||
}
|
||||
/* XXXmcs: this code should be modified to display referrals and references */
|
||||
while ( (rc = ldap_result( ld2, LDAP_RES_ANY, 0, NULL, &res )) ==
|
||||
LDAP_RES_SEARCH_ENTRY ) {
|
||||
e2 = ldap_first_entry( ld1, res );
|
||||
found = 1;
|
||||
if ( !findonly ) {
|
||||
a1 = get_attrs( ld1, e1 );
|
||||
a2 = get_attrs( ld2, e2 );
|
||||
attrcmp = cmp_attrs( a1, a2 );
|
||||
if ( strcmp( attrcmp, "") != 0 ) {
|
||||
printf("\n%s%s\n", dn, attrcmp);
|
||||
}
|
||||
}
|
||||
ldap_msgfree( res );
|
||||
}
|
||||
if ( !found ) {
|
||||
notfound( dn, findonly );
|
||||
differ = 1;
|
||||
}
|
||||
if ( rc == -1 ) {
|
||||
return( ldaptool_print_lderror( ld2, "ldap_result",
|
||||
LDAPTOOL_CHECK4SSL_IF_APPROP ));
|
||||
}
|
||||
ldap_msgfree( res );
|
||||
ldap_memfree( dn );
|
||||
return(rc);
|
||||
}
|
||||
|
||||
|
||||
ATTR*
|
||||
get_attrs( LDAP *ld, LDAPMessage *e )
|
||||
{
|
||||
char *a;
|
||||
ATTR *head, *tail, *tmp;
|
||||
BerElement *ber;
|
||||
|
||||
head=tail=tmp=NULL;
|
||||
for ( a = ldap_first_attribute( ld, e, &ber ); a != NULL;
|
||||
a = ldap_next_attribute( ld, e, ber ) ) {
|
||||
tmp = (ATTR*)malloc(sizeof(ATTR));
|
||||
if(head == NULL)
|
||||
head = tail = tmp;
|
||||
else {
|
||||
tail->next = tmp;
|
||||
tail = tmp;
|
||||
}
|
||||
tmp->name = a;
|
||||
tmp->vals = ldap_get_values( ld, e, a );
|
||||
tmp->next = NULL;
|
||||
}
|
||||
if ( ber != NULL ) {
|
||||
ber_free( ber, 0 );
|
||||
}
|
||||
/* used for debugging
|
||||
tmp=head;
|
||||
while(tmp!= NULL) {
|
||||
printf("\n%s :", tmp->name);
|
||||
for(i=0; tmp->vals[i] != NULL; i++)
|
||||
printf("\n\t%d %s", i, tmp->vals[i]);
|
||||
tmp = tmp->next;
|
||||
}
|
||||
*/
|
||||
return(head);
|
||||
}
|
||||
|
||||
|
||||
char*
|
||||
cmp_attrs( ATTR *a1, ATTR *a2 )
|
||||
{
|
||||
static char result[5000];
|
||||
char res[1000], partial[1000], *name = "";
|
||||
ATTR *head1, *head2, *tmp, *prev, *start;
|
||||
int i, j, found;
|
||||
|
||||
head1 = a1;
|
||||
head2 = a2;
|
||||
tmp = a2;
|
||||
prev = NULL;
|
||||
strcpy(result, "");
|
||||
while(head1 != NULL) {
|
||||
name = head1->name;
|
||||
if(head2 == NULL) {
|
||||
while(head1 != NULL) {
|
||||
sprintf(partial, "\ndifferent: %s(*)", head1->name);
|
||||
strcat(result, partial);
|
||||
for(i=0; head1->vals[i] != NULL; i++) {
|
||||
sprintf(partial,"\n\t1: %s", head1->vals[i]);
|
||||
strcat(result, partial);
|
||||
}
|
||||
tmp = head1;
|
||||
head1 = head1->next;
|
||||
attr_free(tmp);
|
||||
}
|
||||
differ = 1;
|
||||
break;
|
||||
}
|
||||
name = head1->name;
|
||||
start = tmp;
|
||||
while(tmp != NULL) {
|
||||
if(!strcmp(name, tmp->name)) { /* attr found */
|
||||
strcpy(res, "");
|
||||
for(i=0; (head1->vals[i]) != NULL; i++) {
|
||||
found = 0;
|
||||
for(j=0; (tmp->vals[j]) != NULL; j++)
|
||||
if(!strcmp(head1->vals[i], tmp->vals[j])) {
|
||||
found = 1;
|
||||
tmp->vals[j][0] = 7;
|
||||
break;
|
||||
}
|
||||
if(!found) {
|
||||
sprintf(partial, "\n\t1: %s", head1->vals[i]);
|
||||
strcat(res, partial);
|
||||
}
|
||||
}
|
||||
for(j=0; tmp->vals[j] != NULL; j++)
|
||||
if(tmp->vals[j][0] != 7){
|
||||
sprintf(partial, "\n\t2: %s", tmp->vals[j]);
|
||||
strcat(res, partial);
|
||||
}
|
||||
|
||||
if(strcmp(res, "")) {
|
||||
sprintf(partial, "\ndifferent: %s%s", name, res);
|
||||
differ = 1;
|
||||
strcat(result, partial);
|
||||
}
|
||||
if(prev == NULL) { /* tmp = head2 */
|
||||
head2 = head2->next;
|
||||
attr_free(tmp);
|
||||
tmp = head2;
|
||||
}
|
||||
else {
|
||||
prev->next = tmp->next;
|
||||
attr_free(tmp);
|
||||
tmp = prev->next;
|
||||
if(tmp == NULL) {
|
||||
tmp = head2;
|
||||
prev = NULL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
else { /* attr not found */
|
||||
if(prev == NULL)
|
||||
prev = head2;
|
||||
else
|
||||
prev = tmp;
|
||||
tmp = tmp->next;
|
||||
if(tmp == NULL) { /* end of list */
|
||||
tmp = head2;
|
||||
prev = NULL;
|
||||
}
|
||||
if(tmp == start) { /* attr !exist in 2 */
|
||||
sprintf(partial, "\ndifferent: %s(*)", name);
|
||||
differ = 1;
|
||||
strcat(result, partial);
|
||||
for(i=0; head1->vals[i] != NULL; i++) {
|
||||
sprintf(partial, "\n\t1: %s", head1->vals[i]);
|
||||
strcat(result, partial);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
start = head1;
|
||||
head1 = head1->next;
|
||||
attr_free(start);
|
||||
}
|
||||
while(head2 != NULL) {
|
||||
sprintf(partial, "\ndifferent: %s(*)", head2->name);
|
||||
differ = 1;
|
||||
strcat(result, partial);
|
||||
for(i=0; head2->vals[i] != NULL; i++) {
|
||||
sprintf(partial, "\n\t2: %s", head2->vals[i]);
|
||||
strcat(result, partial);
|
||||
}
|
||||
tmp = head2;
|
||||
head2 = head2->next;
|
||||
attr_free(tmp);
|
||||
}
|
||||
return(result);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
attr_free(ATTR *at)
|
||||
{
|
||||
ldap_memfree(at->name);
|
||||
ldap_value_free(at->vals);
|
||||
free(at);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
notfound(char *base, int dbaseno)
|
||||
{
|
||||
printf("%donly: %s\n", dbaseno+1, base);
|
||||
}
|
||||
|
||||
|
||||
#if 0 /* these function is not used */
|
||||
/* used for debugging */
|
||||
static void
|
||||
print_dn( LDAP *ld, LDAPMessage *entry )
|
||||
{
|
||||
char *dn, *ufn;
|
||||
|
||||
dn = ldap_get_dn( ld, entry );
|
||||
if ( ldif ) {
|
||||
write_ldif_value( "dn", dn, strlen( dn ));
|
||||
} else {
|
||||
printf( "%s\n", dn );
|
||||
}
|
||||
if ( includeufn ) {
|
||||
ufn = ldap_dn2ufn( dn );
|
||||
if ( ldif ) {
|
||||
write_ldif_value( "ufn", ufn, strlen( ufn ));
|
||||
} else {
|
||||
printf( "%s\n", ufn );
|
||||
}
|
||||
free( ufn );
|
||||
}
|
||||
ldap_memfree( dn );
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
print_entry( ld, entry, attrsonly )
|
||||
LDAP *ld;
|
||||
LDAPMessage *entry;
|
||||
int attrsonly;
|
||||
{
|
||||
char *a, *dn, *ufn, tmpfname[ 256 ];
|
||||
int i, notascii;
|
||||
BerElement *ber;
|
||||
struct berval **bvals;
|
||||
FILE *tmpfp;
|
||||
#if defined( XP_WIN32 )
|
||||
char mode[20] = "w+b";
|
||||
#else
|
||||
char mode[20] = "w";
|
||||
#endif
|
||||
|
||||
dn = ldap_get_dn( ld, entry );
|
||||
if ( ldif ) {
|
||||
write_ldif_value( "dn", dn, strlen( dn ));
|
||||
} else {
|
||||
printf( "%s\n", dn );
|
||||
}
|
||||
if ( includeufn ) {
|
||||
ufn = ldap_dn2ufn( dn );
|
||||
if ( ldif ) {
|
||||
write_ldif_value( "ufn", ufn, strlen( ufn ));
|
||||
} else {
|
||||
printf( "%s\n", ufn );
|
||||
}
|
||||
free( ufn );
|
||||
}
|
||||
ldap_memfree( dn );
|
||||
|
||||
for ( a = ldap_first_attribute( ld, entry, &ber ); a != NULL;
|
||||
a = ldap_next_attribute( ld, entry, ber ) ) {
|
||||
if ( ldap_charray_inlist(sortattr, a) && /* in the list*/
|
||||
skipsortattr[ldap_charray_position(sortattr, a)] ) {/* and skip it*/
|
||||
continue; /* so skip it! */
|
||||
}
|
||||
if ( attrsonly ) {
|
||||
if ( ldif ) {
|
||||
write_ldif_value( a, "", 0 );
|
||||
} else {
|
||||
printf( "%s\n", a );
|
||||
}
|
||||
} else if (( bvals = ldap_get_values_len( ld, entry, a )) != NULL ) {
|
||||
for ( i = 0; bvals[i] != NULL; i++ ) {
|
||||
if ( vals2tmp ) {
|
||||
sprintf( tmpfname, "%s/ldapcmp-%s-XXXXXX",
|
||||
ldaptool_get_tmp_dir(), a );
|
||||
tmpfp = NULL;
|
||||
|
||||
if ( mktemp( tmpfname ) == NULL ) {
|
||||
perror( tmpfname );
|
||||
} else if (( tmpfp = fopen( tmpfname, mode)) == NULL ) {
|
||||
perror( tmpfname );
|
||||
} else if ( fwrite( bvals[ i ]->bv_val,
|
||||
bvals[ i ]->bv_len, 1, tmpfp ) == 0 ) {
|
||||
perror( tmpfname );
|
||||
} else if ( ldif ) {
|
||||
write_ldif_value( a, tmpfname, strlen( tmpfname ));
|
||||
} else {
|
||||
printf( "%s%s%s\n", a, sep, tmpfname );
|
||||
}
|
||||
|
||||
if ( tmpfp != NULL ) {
|
||||
fclose( tmpfp );
|
||||
}
|
||||
} else {
|
||||
notascii = 0;
|
||||
if ( !ldif && !allow_binary ) {
|
||||
notascii = !ldaptool_berval_is_ascii( bvals[ i ] );
|
||||
}
|
||||
|
||||
if ( ldif ) {
|
||||
write_ldif_value( a, bvals[ i ]->bv_val,
|
||||
bvals[ i ]->bv_len );
|
||||
} else {
|
||||
printf( "%s%s%s\n", a, sep,
|
||||
notascii ? "NOT ASCII" : bvals[ i ]->bv_val );
|
||||
}
|
||||
}
|
||||
}
|
||||
ber_bvecfree( bvals );
|
||||
}
|
||||
}
|
||||
if ( ber != NULL ) {
|
||||
ber_free( ber, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
write_ldif_value( char *type, char *value, unsigned long vallen )
|
||||
{
|
||||
char *ldif;
|
||||
|
||||
if (( ldif = ldif_type_and_value( type, value, (int)vallen )) == NULL ) {
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
fputs( ldif, stdout );
|
||||
free( ldif );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
#endif /* 0 */
|
||||
@@ -1,230 +0,0 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* ldapdelete.c - simple program to delete an entry using LDAP */
|
||||
|
||||
#include "ldaptool.h"
|
||||
#include "fileurl.h"
|
||||
|
||||
static int contoper = 0;
|
||||
static LDAP *ld;
|
||||
static int ldapcompare_quiet = 0;
|
||||
|
||||
static int docompare( LDAP *ld, const char *dn, const char *attrtype,
|
||||
const struct berval *bvalue, LDAPControl **serverctrls );
|
||||
static void options_callback( int option, char *optarg );
|
||||
static int typeval2berval( char *typeval, char **typep, struct berval *bvp );
|
||||
|
||||
|
||||
static void
|
||||
usage( int rc )
|
||||
{
|
||||
fprintf( stderr, "usage: %s [options] attributetype:value [dn...]\n",
|
||||
ldaptool_progname );
|
||||
fprintf( stderr, " %s [options] attributetype::base64value [dn...]\n",
|
||||
ldaptool_progname );
|
||||
fprintf( stderr, " %s [options] attributetype:<fileurl [dn...]\n",
|
||||
ldaptool_progname );
|
||||
fprintf( stderr, "options:\n" );
|
||||
ldaptool_common_usage( 0 );
|
||||
fprintf( stderr, " -c\t\tcontinuous mode (do not stop on errors)\n" );
|
||||
fprintf( stderr, " -f file\tread DNs to compare against from file\n" );
|
||||
fprintf( stderr, " -q\t\tbe quiet when comparing entries\n" );
|
||||
exit( rc );
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main( int argc, char **argv )
|
||||
{
|
||||
char buf[ 4096 ], *typeval = NULL, *type = NULL;
|
||||
struct berval bv;
|
||||
int rc, optind;
|
||||
LDAPControl *ldctrl;
|
||||
|
||||
#ifdef notdef
|
||||
#ifdef HPUX11
|
||||
#ifndef __LP64__
|
||||
_main( argc, argv);
|
||||
#endif /* __LP64_ */
|
||||
#endif /* HPUX11 */
|
||||
#endif
|
||||
|
||||
optind = ldaptool_process_args( argc, argv, "cq", 0, options_callback );
|
||||
|
||||
if ( ldaptool_fp == NULL && optind >= argc ) {
|
||||
ldaptool_fp = stdin;
|
||||
}
|
||||
|
||||
ld = ldaptool_ldap_init( 0 );
|
||||
|
||||
ldaptool_bind( ld );
|
||||
|
||||
if (( ldctrl = ldaptool_create_manage_dsait_control()) != NULL ) {
|
||||
ldaptool_add_control_to_array( ldctrl, ldaptool_request_ctrls);
|
||||
}
|
||||
|
||||
if ((ldctrl = ldaptool_create_proxyauth_control(ld)) !=NULL) {
|
||||
ldaptool_add_control_to_array( ldctrl, ldaptool_request_ctrls);
|
||||
}
|
||||
|
||||
if ( optind >= argc ) {
|
||||
usage( LDAP_PARAM_ERROR );
|
||||
}
|
||||
|
||||
typeval = ldaptool_local2UTF8( argv[optind] );
|
||||
if (( rc = typeval2berval( typeval, &type, &bv )) != LDAP_SUCCESS ) {
|
||||
fprintf( stderr, "%s: unable to parse \"%s\"\n",
|
||||
ldaptool_progname, argv[optind] );
|
||||
usage( rc );
|
||||
free( typeval );
|
||||
}
|
||||
++optind;
|
||||
|
||||
rc = 0;
|
||||
if ( ldaptool_fp == NULL ) {
|
||||
for ( ; optind < argc &&
|
||||
( contoper || !LDAPTOOL_RESULT_IS_AN_ERROR( rc ) );
|
||||
++optind ) {
|
||||
char *conv;
|
||||
|
||||
conv = ldaptool_local2UTF8( argv[ optind ] );
|
||||
rc = docompare( ld, conv, type, &bv, ldaptool_request_ctrls );
|
||||
if ( conv != NULL ) {
|
||||
free( conv );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
while ( contoper || !LDAPTOOL_RESULT_IS_AN_ERROR( rc ) &&
|
||||
fgets(buf, sizeof(buf), ldaptool_fp) != NULL) {
|
||||
buf[ strlen( buf ) - 1 ] = '\0'; /* remove trailing newline */
|
||||
if ( *buf != '\0' ) {
|
||||
rc = docompare( ld, buf, type, &bv, ldaptool_request_ctrls );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ldaptool_reset_control_array( ldaptool_request_ctrls );
|
||||
ldaptool_cleanup( ld );
|
||||
if ( typeval != NULL ) free( typeval );
|
||||
if ( bv.bv_val != NULL ) free( bv.bv_val );
|
||||
|
||||
return( rc );
|
||||
}
|
||||
|
||||
static void
|
||||
options_callback( int option, char *optarg )
|
||||
{
|
||||
switch( option ) {
|
||||
case 'c': /* continuous operation mode */
|
||||
++contoper;
|
||||
break;
|
||||
case 'q': /* continuous operation mode */
|
||||
++ldapcompare_quiet;
|
||||
break;
|
||||
default:
|
||||
usage( LDAP_PARAM_ERROR );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
docompare( LDAP *ld, const char *dn, const char *attrtype,
|
||||
const struct berval *bvalue, LDAPControl **serverctrls )
|
||||
{
|
||||
int rc;
|
||||
|
||||
if ( !ldapcompare_quiet ) {
|
||||
char *valuestr, tmpbuf[256];
|
||||
|
||||
if ( ldaptool_berval_is_ascii( bvalue )) {
|
||||
valuestr = bvalue->bv_val;
|
||||
} else {
|
||||
#ifdef HAVE_SNPRINTF
|
||||
snprintf( tmpbuf, sizeof(tmpbuf), "NOT ASCII (%ld bytes)",
|
||||
bvalue->bv_len );
|
||||
#else
|
||||
sprintf( tmpbuf, "NOT ASCII (%ld bytes)",
|
||||
bvalue->bv_len );
|
||||
#endif
|
||||
valuestr = tmpbuf;
|
||||
}
|
||||
printf( "%scomparing type: \"%s\" value: \"%s\" in entry \"%s\"\n",
|
||||
ldaptool_not ? "!" : "", attrtype, valuestr, dn );
|
||||
}
|
||||
if ( ldaptool_not ) {
|
||||
rc = LDAP_COMPARE_TRUE;
|
||||
} else {
|
||||
rc = ldaptool_compare_ext_s( ld, dn, attrtype, bvalue,
|
||||
serverctrls, NULL, "ldap_compare" );
|
||||
if ( !ldapcompare_quiet ) {
|
||||
if ( rc == LDAP_COMPARE_TRUE ) {
|
||||
puts( "compare TRUE" );
|
||||
} else if ( rc == LDAP_COMPARE_FALSE ) {
|
||||
puts( "compare FALSE" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return( rc );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Parse an ldapcompare type:value or type::value argument.
|
||||
*
|
||||
* The *typep is set to point into the typeval string.
|
||||
* bvp->bv_val is created from malloc'd memory.
|
||||
*
|
||||
* This function returns an LDAP error code (LDAP_SUCCESS if all goes well).
|
||||
*/
|
||||
static int
|
||||
typeval2berval( char *typeval, char **typep, struct berval *bvp )
|
||||
{
|
||||
char *value;
|
||||
int vlen, rc;
|
||||
|
||||
if ( ldif_parse_line( typeval, typep, &value, &vlen ) != 0 ) {
|
||||
return( LDAP_PARAM_ERROR );
|
||||
}
|
||||
|
||||
rc = ldaptool_berval_from_ldif_value( value, vlen, bvp,
|
||||
1 /* recognize file URLs */, 0 /* always try file */,
|
||||
1 /* report errors */ );
|
||||
|
||||
return( ldaptool_fileurlerr2ldaperr( rc ));
|
||||
}
|
||||
@@ -1,157 +0,0 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* ldapdelete.c - simple program to delete an entry using LDAP */
|
||||
|
||||
#include "ldaptool.h"
|
||||
|
||||
static int contoper;
|
||||
static LDAP *ld;
|
||||
|
||||
static int dodelete( LDAP *ld, char *dn, LDAPControl **serverctrls );
|
||||
static void options_callback( int option, char *optarg );
|
||||
|
||||
|
||||
static void
|
||||
usage( void )
|
||||
{
|
||||
fprintf( stderr, "usage: %s [options] [dn...]\n", ldaptool_progname );
|
||||
fprintf( stderr, "options:\n" );
|
||||
ldaptool_common_usage( 0 );
|
||||
fprintf( stderr, " -c\t\tcontinuous mode (do not stop on errors)\n" );
|
||||
fprintf( stderr, " -f file\tread DNs to delete from file (default: standard input)\n" );
|
||||
exit( LDAP_PARAM_ERROR );
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main( int argc, char **argv )
|
||||
{
|
||||
char buf[ 4096 ];
|
||||
int rc, deref, optind;
|
||||
LDAPControl *ldctrl;
|
||||
|
||||
#ifdef notdef
|
||||
#ifdef HPUX11
|
||||
#ifndef __LP64__
|
||||
_main( argc, argv);
|
||||
#endif /* __LP64_ */
|
||||
#endif /* HPUX11 */
|
||||
#endif
|
||||
|
||||
contoper = 0;
|
||||
|
||||
optind = ldaptool_process_args( argc, argv, "c", 0, options_callback );
|
||||
|
||||
if ( optind == -1 ) {
|
||||
usage();
|
||||
}
|
||||
|
||||
if ( ldaptool_fp == NULL && optind >= argc ) {
|
||||
ldaptool_fp = stdin;
|
||||
}
|
||||
|
||||
ld = ldaptool_ldap_init( 0 );
|
||||
|
||||
deref = LDAP_DEREF_NEVER; /* prudent, but probably unnecessary */
|
||||
ldap_set_option( ld, LDAP_OPT_DEREF, &deref );
|
||||
|
||||
ldaptool_bind( ld );
|
||||
|
||||
if (( ldctrl = ldaptool_create_manage_dsait_control()) != NULL ) {
|
||||
ldaptool_add_control_to_array( ldctrl, ldaptool_request_ctrls);
|
||||
}
|
||||
|
||||
if ((ldctrl = ldaptool_create_proxyauth_control(ld)) !=NULL) {
|
||||
ldaptool_add_control_to_array( ldctrl, ldaptool_request_ctrls);
|
||||
}
|
||||
|
||||
if ( ldaptool_fp == NULL ) {
|
||||
for ( ; optind < argc; ++optind ) {
|
||||
char *conv;
|
||||
|
||||
conv = ldaptool_local2UTF8( argv[ optind ] );
|
||||
rc = dodelete( ld, conv, ldaptool_request_ctrls );
|
||||
if( conv != NULL )
|
||||
free( conv );
|
||||
}
|
||||
} else {
|
||||
rc = 0;
|
||||
while ((rc == 0 || contoper) &&
|
||||
fgets(buf, sizeof(buf), ldaptool_fp) != NULL) {
|
||||
buf[ strlen( buf ) - 1 ] = '\0'; /* remove trailing newline */
|
||||
if ( *buf != '\0' ) {
|
||||
rc = dodelete( ld, buf, ldaptool_request_ctrls );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ldaptool_reset_control_array( ldaptool_request_ctrls );
|
||||
ldaptool_cleanup( ld );
|
||||
return( rc );
|
||||
}
|
||||
|
||||
static void
|
||||
options_callback( int option, char *optarg )
|
||||
{
|
||||
switch( option ) {
|
||||
case 'c': /* continuous operation mode */
|
||||
++contoper;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
dodelete( LDAP *ld, char *dn, LDAPControl **serverctrls )
|
||||
{
|
||||
int rc;
|
||||
|
||||
if ( ldaptool_verbose ) {
|
||||
printf( "%sdeleting entry %s\n", ldaptool_not ? "!" : "", dn );
|
||||
}
|
||||
if ( ldaptool_not ) {
|
||||
rc = LDAP_SUCCESS;
|
||||
} else if (( rc = ldaptool_delete_ext_s( ld, dn, serverctrls, NULL,
|
||||
"ldap_delete" )) == LDAP_SUCCESS && ldaptool_verbose ) {
|
||||
printf( "entry removed\n" );
|
||||
}
|
||||
|
||||
return( rc );
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,187 +0,0 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* ldapmodrdn.c - generic program to modify an entry's RDN using LDAP */
|
||||
|
||||
#include "ldaptool.h"
|
||||
|
||||
static int domodrdn( LDAP *ld, char *dn, char *rdn, int remove,
|
||||
LDAPControl **serverctrls);
|
||||
static void options_callback( int option, char *optarg );
|
||||
|
||||
static int contoper, remove_oldrdn;
|
||||
static LDAP *ld;
|
||||
|
||||
|
||||
static void
|
||||
usage( void )
|
||||
{
|
||||
fprintf( stderr, "usage: %s [options] [dn rdn]\n", ldaptool_progname );
|
||||
fprintf( stderr, "options:\n" );
|
||||
ldaptool_common_usage( 0 );
|
||||
fprintf( stderr, " -c\t\tcontinuous mode (do not stop on errors)\n" );
|
||||
fprintf( stderr, " -r\t\tremove old RDN\n" );
|
||||
fprintf( stderr, " -f file\tread changes from file\n" );
|
||||
exit( LDAP_PARAM_ERROR );
|
||||
}
|
||||
|
||||
|
||||
main( argc, argv )
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
char *entrydn, *rdn, buf[ 4096 ];
|
||||
int rc, havedn, deref, optind;
|
||||
LDAPControl *ctrls[2], **serverctrls;
|
||||
|
||||
contoper = remove_oldrdn = 0;
|
||||
|
||||
optind = ldaptool_process_args( argc, argv, "cr", 0, options_callback );
|
||||
|
||||
if ( optind == -1 ) {
|
||||
usage();
|
||||
}
|
||||
|
||||
if ( ldaptool_fp == NULL ) {
|
||||
ldaptool_fp = stdin;
|
||||
}
|
||||
|
||||
havedn = 0;
|
||||
if (argc - optind == 2) {
|
||||
if (( rdn = strdup( argv[argc - 1] )) == NULL ) {
|
||||
perror( "strdup" );
|
||||
exit( LDAP_NO_MEMORY );
|
||||
}
|
||||
if (( entrydn = strdup( argv[argc - 2] )) == NULL ) {
|
||||
perror( "strdup" );
|
||||
exit( LDAP_NO_MEMORY );
|
||||
}
|
||||
++havedn;
|
||||
} else if ( argc - optind != 0 ) {
|
||||
fprintf( stderr, "%s: invalid number of arguments, only two allowed\n",
|
||||
ldaptool_progname );
|
||||
usage();
|
||||
}
|
||||
|
||||
ld = ldaptool_ldap_init( 0 );
|
||||
|
||||
if ( !ldaptool_not ) {
|
||||
deref = LDAP_DEREF_NEVER; /* this seems prudent */
|
||||
ldap_set_option( ld, LDAP_OPT_DEREF, &deref );
|
||||
}
|
||||
|
||||
ldaptool_bind( ld );
|
||||
|
||||
if (( ctrls[0] = ldaptool_create_manage_dsait_control()) != NULL ) {
|
||||
ctrls[1] = NULL;
|
||||
serverctrls = ctrls;
|
||||
} else {
|
||||
serverctrls = NULL;
|
||||
}
|
||||
|
||||
rc = 0;
|
||||
if (havedn) {
|
||||
rc = domodrdn(ld, entrydn, rdn, remove_oldrdn, serverctrls);
|
||||
} else while ((rc == 0 || contoper) &&
|
||||
fgets(buf, sizeof(buf), ldaptool_fp) != NULL) {
|
||||
if ( *buf != '\0' && *buf != '\n' ) { /* skip blank lines */
|
||||
buf[ strlen( buf ) - 1 ] = '\0'; /* remove nl */
|
||||
|
||||
if ( havedn ) { /* have DN, get RDN */
|
||||
if (( rdn = strdup( buf )) == NULL ) {
|
||||
perror( "strdup" );
|
||||
exit( LDAP_NO_MEMORY );
|
||||
}
|
||||
rc = domodrdn(ld, entrydn, rdn, remove_oldrdn, serverctrls);
|
||||
havedn = 0;
|
||||
} else if ( !havedn ) { /* don't have DN yet */
|
||||
if (( entrydn = strdup( buf )) == NULL ) {
|
||||
perror( "strdup" );
|
||||
exit( LDAP_NO_MEMORY );
|
||||
}
|
||||
++havedn;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ldaptool_cleanup( ld );
|
||||
exit( rc );
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
options_callback( int option, char *optarg )
|
||||
{
|
||||
switch( option ) {
|
||||
case 'c': /* continuous operation mode */
|
||||
++contoper;
|
||||
break;
|
||||
case 'r': /* remove old RDN */
|
||||
++remove_oldrdn;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
domodrdn( LDAP *ld, char *dn, char *rdn, int remove_oldrdn,
|
||||
LDAPControl **serverctrls )
|
||||
{
|
||||
int i;
|
||||
|
||||
if ( ldaptool_verbose ) {
|
||||
printf( "modrdn %s:\n\t%s\n", dn, rdn );
|
||||
if (remove_oldrdn)
|
||||
printf("removing old RDN\n");
|
||||
else
|
||||
printf("keeping old RDN\n");
|
||||
}
|
||||
|
||||
if ( !ldaptool_not ) {
|
||||
if (( i = ldaptool_rename_s( ld, dn, rdn, NULL, remove_oldrdn,
|
||||
serverctrls, NULL, "ldap_rename" )) == LDAP_SUCCESS
|
||||
&& ldaptool_verbose ) {
|
||||
printf( "modrdn complete\n" );
|
||||
}
|
||||
} else {
|
||||
i = LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
return( i );
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,194 +0,0 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef _LDAPTOOL_H
|
||||
#define _LDAPTOOL_H
|
||||
|
||||
/* XXX:mhein The following is a workaround for the redefinition of */
|
||||
/* const problem on OSF. Fix to be provided by NSS */
|
||||
/* This is a pretty benign workaround for us which */
|
||||
/* should not cause problems in the future even if */
|
||||
/* we forget to take it out :-) */
|
||||
|
||||
#ifdef OSF1V4D
|
||||
#ifndef __STDC__
|
||||
# define __STDC__
|
||||
#endif /* __STDC__ */
|
||||
#endif /* OSF1V4D */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef AIX
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef SCOOS
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
extern int getopt (int argc, char *const *argv, const char *optstring);
|
||||
#else
|
||||
#include <sys/file.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#ifndef SCOOS
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#if defined(NET_SSL)
|
||||
#include <ssl.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <portable.h>
|
||||
|
||||
#include <ldap.h>
|
||||
#ifndef NO_LIBLCACHE
|
||||
#include <lcache.h>
|
||||
#endif
|
||||
|
||||
#include <ldaplog.h>
|
||||
#include <ldif.h>
|
||||
|
||||
#if defined(NET_SSL)
|
||||
#include <ldap_ssl.h>
|
||||
#endif
|
||||
|
||||
#include <ldappr.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* shared macros, structures, etc.
|
||||
*/
|
||||
#define LDAPTOOL_RESULT_IS_AN_ERROR( rc ) \
|
||||
( (rc) != LDAP_SUCCESS && (rc) != LDAP_COMPARE_TRUE \
|
||||
&& (rc) != LDAP_COMPARE_FALSE )
|
||||
|
||||
#define LDAPTOOL_DEFSEP "=" /* used by ldapcmp and ldapsearch */
|
||||
#define LDAPTOOL_DEFHOST "localhost"
|
||||
#define LDAPTOOL_DEFCERTDBPATH "."
|
||||
#define LDAPTOOL_DEFKEYDBPATH "."
|
||||
#define LDAPTOOL_DEFREFHOPLIMIT 5
|
||||
|
||||
#define LDAPTOOL_SAFEREALLOC( ptr, size ) ( ptr == NULL ? malloc( size ) : \
|
||||
realloc( ptr, size ))
|
||||
/* this defines the max number of control requests for the tools */
|
||||
#define CONTROL_REQUESTS 50
|
||||
|
||||
/*
|
||||
* globals (defined in common.c)
|
||||
*/
|
||||
extern char *ldaptool_host;
|
||||
extern char *ldaptool_host2;
|
||||
extern int ldaptool_port;
|
||||
extern int ldaptool_port2;
|
||||
extern int ldaptool_verbose;
|
||||
extern int ldaptool_not;
|
||||
extern char *ldaptool_progname;
|
||||
extern FILE *ldaptool_fp;
|
||||
extern char *ldaptool_charset;
|
||||
extern char *ldaptool_convdir;
|
||||
extern LDAPControl *ldaptool_request_ctrls[];
|
||||
|
||||
|
||||
/*
|
||||
* function prototypes
|
||||
*/
|
||||
void ldaptool_common_usage( int two_hosts );
|
||||
int ldaptool_process_args( int argc, char **argv, char *extra_opts,
|
||||
int two_hosts, void (*extra_opt_callback)( int option, char *optarg ));
|
||||
LDAP *ldaptool_ldap_init( int second_host );
|
||||
void ldaptool_bind( LDAP *ld );
|
||||
void ldaptool_cleanup( LDAP *ld );
|
||||
int ldaptool_print_lderror( LDAP *ld, char *msg, int check4ssl );
|
||||
#define LDAPTOOL_CHECK4SSL_NEVER 0
|
||||
#define LDAPTOOL_CHECK4SSL_ALWAYS 1
|
||||
#define LDAPTOOL_CHECK4SSL_IF_APPROP 2 /* if appropriate */
|
||||
LDAPControl *ldaptool_create_manage_dsait_control( void );
|
||||
void ldaptool_print_referrals( char **refs );
|
||||
int ldaptool_print_extended_response( LDAP *ld, LDAPMessage *res, char *msg );
|
||||
LDAPControl *ldaptool_create_proxyauth_control( LDAP *ld );
|
||||
void ldaptool_add_control_to_array( LDAPControl *ctrl, LDAPControl **array);
|
||||
void ldaptool_reset_control_array( LDAPControl **array );
|
||||
char *ldaptool_get_tmp_dir( void );
|
||||
char *ldaptool_local2UTF8( const char * );
|
||||
int ldaptool_berval_is_ascii( const struct berval *bvp );
|
||||
int ldaptool_sasl_bind_s( LDAP *ld, const char *dn, const char *mechanism,
|
||||
const struct berval *cred, LDAPControl **serverctrls,
|
||||
LDAPControl **clientctrls, struct berval **servercredp, char *msg );
|
||||
int ldaptool_simple_bind_s( LDAP *ld, const char *dn, const char *passwd,
|
||||
LDAPControl **serverctrls, LDAPControl **clientctrls, char *msg );
|
||||
int ldaptool_add_ext_s( LDAP *ld, const char *dn, LDAPMod **attrs,
|
||||
LDAPControl **serverctrls, LDAPControl **clientctrls, char *msg );
|
||||
int ldaptool_modify_ext_s( LDAP *ld, const char *dn, LDAPMod **mods,
|
||||
LDAPControl **serverctrls, LDAPControl **clientctrls, char *msg );
|
||||
int ldaptool_delete_ext_s( LDAP *ld, const char *dn, LDAPControl **serverctrls,
|
||||
LDAPControl **clientctrls, char *msg );
|
||||
int ldaptool_rename_s( LDAP *ld, const char *dn, const char *newrdn,
|
||||
const char *newparent, int deleteoldrdn, LDAPControl **serverctrls,
|
||||
LDAPControl **clientctrls, char *msg );
|
||||
int ldaptool_compare_ext_s( LDAP *ld, const char *dn, const char *attrtype,
|
||||
const struct berval *bvalue, LDAPControl **serverctrls,
|
||||
LDAPControl **clientctrls, char *msg );
|
||||
int ldaptool_boolean_str2value ( const char *s, int strict );
|
||||
int ldaptool_parse_ctrl_arg ( char *ctrl_arg, char sep, char **ctrl_oid,
|
||||
int *ctrl_criticality, char **ctrl_value, int *vlen);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LDAPTOOL_H */
|
||||
@@ -1,130 +0,0 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/******************************************************
|
||||
*
|
||||
* ntuserpin.c - Prompts for the key
|
||||
* database passphrase.
|
||||
*
|
||||
******************************************************/
|
||||
|
||||
#if defined( _WIN32 ) && defined ( NET_SSL )
|
||||
|
||||
#include <conio.h>
|
||||
#include "ntuserpin.h"
|
||||
|
||||
#undef Debug
|
||||
#undef OFF
|
||||
#undef LITTLE_ENDIAN
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
static int i=0;
|
||||
static int cbRemotePassword = 0;
|
||||
static const char nt_retryWarning[] =
|
||||
"Warning: You entered an incorrect PIN.\nIncorrect PIN may result in disabling the token";
|
||||
static const char prompt[] = "Enter PIN for";
|
||||
|
||||
|
||||
#define SZ_LOCAL_PWD 1024
|
||||
static char loclpwd[SZ_LOCAL_PWD] = "";
|
||||
struct SVRCORENTUserPinObj
|
||||
{
|
||||
SVRCOREPinObj base;
|
||||
};
|
||||
static const struct SVRCOREPinMethods vtable;
|
||||
/* ------------------------------------------------------------ */
|
||||
SVRCOREError
|
||||
SVRCORE_CreateNTUserPinObj(SVRCORENTUserPinObj **out)
|
||||
{
|
||||
SVRCOREError err = 0;
|
||||
SVRCORENTUserPinObj *obj = 0;
|
||||
do {
|
||||
obj = (SVRCORENTUserPinObj*)malloc(sizeof (SVRCORENTUserPinObj));
|
||||
if (!obj) { err = 1; break; }
|
||||
obj->base.methods = &vtable;
|
||||
} while(0);
|
||||
if (err)
|
||||
{
|
||||
SVRCORE_DestroyNTUserPinObj(obj);
|
||||
obj = 0;
|
||||
}
|
||||
*out = obj;
|
||||
return err;
|
||||
}
|
||||
void
|
||||
SVRCORE_DestroyNTUserPinObj(SVRCORENTUserPinObj *obj)
|
||||
{
|
||||
if (obj) free(obj);
|
||||
}
|
||||
static void destroyObject(SVRCOREPinObj *obj)
|
||||
{
|
||||
SVRCORE_DestroyNTUserPinObj((SVRCORENTUserPinObj*)obj);
|
||||
}
|
||||
static char *getPin(SVRCOREPinObj *obj, const char *tokenName, PRBool retry)
|
||||
{
|
||||
char *pwd;
|
||||
int ch;
|
||||
if (retry)
|
||||
printf("%s\n",nt_retryWarning);
|
||||
printf("%s %s:", prompt, tokenName);
|
||||
pwd = &loclpwd[0];
|
||||
do
|
||||
{
|
||||
ch = _getch();
|
||||
*pwd++ = (char )ch;
|
||||
} while( ch != '\r' && (pwd < &loclpwd[SZ_LOCAL_PWD - 1]));
|
||||
*(pwd-1)='\0';
|
||||
printf("\n");
|
||||
|
||||
/* test for zero length password. if zero length, return null */
|
||||
if ('\0' == loclpwd[0])
|
||||
return NULL;
|
||||
|
||||
return &loclpwd[0];
|
||||
}
|
||||
|
||||
/*
|
||||
* VTable
|
||||
*/
|
||||
static const SVRCOREPinMethods vtable =
|
||||
{ 0, 0, destroyObject, getPin };
|
||||
#endif /* defined( _WIN32 ) && defined ( NET_SSL ) */
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998-1999
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/******************************************************
|
||||
*
|
||||
* ntuserpin.h - Prompts for the key
|
||||
* database passphrase.
|
||||
*
|
||||
******************************************************/
|
||||
#ifndef _NTUSERPIN_H_
|
||||
#define _NTUSERPIN_H_
|
||||
#include "svrcore.h"
|
||||
|
||||
typedef struct SVRCORENTUserPinObj SVRCORENTUserPinObj;
|
||||
|
||||
SVRCOREError
|
||||
SVRCORE_CreateNTUserPinObj(SVRCORENTUserPinObj **out);
|
||||
|
||||
void
|
||||
SVRCORE_SetNTUserPinInteractive(SVRCORENTUserPinObj *obj, PRBool interactive);
|
||||
|
||||
void
|
||||
SVRCORE_DestroyNTUserPinObj(SVRCORENTUserPinObj *obj);
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user