Compare commits

..

2 Commits

Author SHA1 Message Date
heikki%netscape.com
a637f81f7f new project started
git-svn-id: svn://10.0.0.236/branches/mozilla@91184 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-03 22:13:38 +00:00
(no author)
6cfadae5d1 This commit was manufactured by cvs2svn to create branch 'mozilla'.
git-svn-id: svn://10.0.0.236/branches/mozilla@8534 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-26 18:36:10 +00:00
6 changed files with 102 additions and 285 deletions

View File

@@ -1,168 +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):
#
DEPTH = ../../../../..
NS_DEPTH = ../../../..
LDAP_SRC = ../..
NSCP_DISTDIR = ../../../../../dist
NSPR_TREE = ../../..
MOD_DEPTH = ../../..
include $(NSPR_TREE)/config/rules.mk
include ../../../build.mk
SRCS = ldappr-dns.c \
ldappr-error.c \
ldappr-io.c \
ldappr-public.c \
ldappr-threads.c
ifeq ($(OS_ARCH), WINNT)
REALOBJS = $(SRCS:.c=.obj)
else
REALOBJS = $(SRCS:.c=.o)
endif
PROBJDEST = $(OBJDIR_NAME)
OBJS = $(addprefix $(PROBJDEST)/, $(REALOBJS))
DISTHDIR = $(NSCP_DISTDIR)/public/ldap
HDIR = $(LDAP_SRC)/include
ifeq ($(OS_ARCH), WINNT)
LIBPRLDAP = $(addprefix $(PROBJDEST)/, \
nsldappr32v$(PRLDAPVERS).$(DLL_SUFFIX))
DLLPRLDAP = $(addprefix $(PROBJDEST)/, \
nsldappr32v$(PRLDAPVERS).$(LIB_SUFFIX))
else
LIBPRLDAP = $(addprefix $(PROBJDEST)/, lib$(PRLDAP_LIBNAME).$(DLL_SUFFIX))
endif
INSTALLDIR = $(DEPTH)/dist/$(OBJDIR_NAME)
LOCAL_INCLUDES = -I$(PUBLIC)/nspr
INCLUDES += -I$(DISTHDIR) -I$(HDIR) -I$(INSTALLDIR)/include \
-I../../../../../dist/include
DEFINES += $(DEFS)
PLATFORMCFLAGS = -DUSE_WAITPID -DNEEDPROTOS
PLATFORMLIBS =
THREADS =
THREADSLIB =
#
# shared library symbol export definitions
#
ifeq ($(USE_DLL_EXPORTS_FILE), 1)
ifeq ($(OS_ARCH), WINNT)
GENEXPORTS=cmd /c $(PERL) $(LDAP_SRC)/build/genexports.pl
else
GENEXPORTS=$(PERL) $(LDAP_SRC)/build/genexports.pl
endif
# variable definitions for exported symbols
ifeq ($(OS_ARCH), WINNT)
PRLDAP_EXPORT_DEFS=../msdos/winsock/nsldappr32.def
else
PRLDAP_EXPORT_DEFS= $(PROBJDEST)/libprldap.exp
endif
PRLDAP_EXPORT_FLAGS=$(addprefix $(DLLEXPORTS_PREFIX), $(PRLDAP_EXPORT_DEFS))
GENEXPARGS=$(BUILD_DEBUG) $(PRLDAPVERS_SUFFIX) $(PRLDAPVERS)
endif # USE_DLL_EXPORTS_FILE
ifeq ($(OS_ARCH), SunOS)
EXTRA_LIBS = -L$(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib -l$(LDAP_LIBNAME)
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/$(LDAP_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
endif
ifeq ($(OS_ARCH), OSF1)
EXTRA_LIBS = -L$(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib -l$(LDAP_LIBNAME)
EXTRA_LIBS += -L$(NSCP_DISTDIR)/lib $(DYNAMICNSPR)
EXTRA_LIBS += -lcxx -lpthread -lrt -lmach -lexc
endif
ifeq ($(OS_ARCH), AIX)
EXTRA_LIBS = -L$(NSCP_DISTDIR)/$(OBJDIR_NAME)/lib -l$(LDAP_LIBNAME)
EXTRA_LIBS += -L$(NSCP_DISTDIR)/lib $(DYNAMICNSPR)
EXTRA_LIBS += -ldl -brtl -lpthreads -lc_r -lm
endif
OBJDEST = $(OBJDIR_NAME)
###########################################################################
# recursive gmake rule to create exported symbols file
$(PROBJDEST)/libprldap.exp:: libprldap.ex
ifeq ($(OS_ARCH), WINNT)
$(GENEXPORTS) Win32 Standard $< $(GENEXPARGS) > $@
else
$(GENEXPORTS) $(OS_ARCH) Standard $< $(GENEXPARGS) > $@
endif
versiont.c: Makefile.client Version.c
@$(RM) $@
@(u="$${USER-root}" v="$(shell cat ../../build/version)" d="$(shell pwd)" \
h="$(shell hostname)" t="$(shell date)"; $(SED) -e "s|%WHEN%|$${t}|" \
-e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
-e "s|%VERSION%|$${v}|" \
< Version.c > $@)
all:: $(OBJDEST) $(LIBDIR) $(OBJS) $(LIBPRLDAP)
$(LIBDIR):
$(MKDIR) $(LIBDIR)
$(LIBPRLDAP): $(OBJS) $(LIBDIR) $(PRLDAP_EXPORT_DEFS)
@echo ======= making $(LIBPRLDAP)
ifdef SO_FILES_TO_REMOVE
-$(RM) $(SO_FILES_TO_REMOVE)
endif
$(LINK_DLL) $(DSO_LDOPTS) $(PRLDAP_EXPORT_FLAGS) $(EXTRA_LIBS)
veryclean:: clean
clean::
$(RM) $(OBJS) $(LIBPRLDAP)
$(RM) -r $(PROBJDEST)
$(OBJDEST):
$(MKDIR) $(OBJDEST)
install:: $(LIBPRLDAP)
ifeq ($(OS_ARCH), WINNT)
$(INSTALL) -m 555 $(LIBPRLDAP) $(INSTALLDIR)/lib
$(INSTALL) -m 555 $(DLLPRLDAP) $(INSTALLDIR)/lib
endif
ifdef MKSHLIB
$(INSTALL) -m 555 $(LIBPRLDAP) $(INSTALLDIR)/lib
endif

View File

@@ -1,117 +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):
*/
/*
* DNS callback functions for libldap that use the NSPR (Netscape
* Portable Runtime) thread API.
*
*/
#include "ldappr-int.h"
static LDAPHostEnt *prldap_gethostbyname( const char *name,
LDAPHostEnt *result, char *buffer, int buflen, int *statusp,
void *extradata );
static LDAPHostEnt *prldap_gethostbyaddr( const char *addr, int length,
int type, LDAPHostEnt *result, char *buffer, int buflen,
int *statusp, void *extradata );
static LDAPHostEnt *prldap_convert_hostent( LDAPHostEnt *ldhp,
PRHostEnt *prhp );
/*
* Install NSPR DNS functions into ld (if ld is NULL, they are installed
* as the default functions for new LDAP * handles).
*
* Returns 0 if all goes well and -1 if not.
*/
int
prldap_install_dns_functions( LDAP *ld )
{
struct ldap_dns_fns dnsfns;
memset( &dnsfns, '\0', sizeof(struct ldap_dns_fns) );
dnsfns.lddnsfn_bufsize = PR_NETDB_BUF_SIZE;
dnsfns.lddnsfn_gethostbyname = prldap_gethostbyname;
dnsfns.lddnsfn_gethostbyaddr = prldap_gethostbyaddr;
if ( ldap_set_option( ld, LDAP_OPT_DNS_FN_PTRS, (void *)&dnsfns ) != 0 ) {
return( -1 );
}
return( 0 );
}
static LDAPHostEnt *
prldap_gethostbyname( const char *name, LDAPHostEnt *result,
char *buffer, int buflen, int *statusp, void *extradata )
{
PRHostEnt prhent;
if( !statusp || ( *statusp = (int)PR_GetIPNodeByName( name,
PRLDAP_DEFAULT_ADDRESS_FAMILY, PR_AI_DEFAULT,
buffer, buflen, &prhent )) == PR_FAILURE ) {
return( NULL );
}
return( prldap_convert_hostent( result, &prhent ));
}
static LDAPHostEnt *
prldap_gethostbyaddr( const char *addr, int length, int type,
LDAPHostEnt *result, char *buffer, int buflen, int *statusp,
void *extradata )
{
PRHostEnt prhent;
PRNetAddr iaddr;
if ( PR_SetNetAddr(PR_IpAddrNull, PRLDAP_DEFAULT_ADDRESS_FAMILY,
0, &iaddr) == PR_FAILURE
|| PR_StringToNetAddr( addr, &iaddr ) == PR_FAILURE ) {
return( NULL );
}
if( !statusp || (*statusp = PR_GetHostByAddr(&iaddr, buffer,
buflen, &prhent )) == PR_FAILURE ) {
return( NULL );
}
return( prldap_convert_hostent( result, &prhent ));
}
/*
* Function: prldap_convert_hostent()
* Description: copy the fields of a PRHostEnt struct to an LDAPHostEnt
* Returns: the LDAPHostEnt pointer passed in.
*/
static LDAPHostEnt *
prldap_convert_hostent( LDAPHostEnt *ldhp, PRHostEnt *prhp )
{
ldhp->ldaphe_name = prhp->h_name;
ldhp->ldaphe_aliases = prhp->h_aliases;
ldhp->ldaphe_addrtype = prhp->h_addrtype;
ldhp->ldaphe_length = prhp->h_length;
ldhp->ldaphe_addr_list = prhp->h_addr_list;
return( ldhp );
}

48
mozilla/mozilla.kdevprj Normal file
View File

@@ -0,0 +1,48 @@
# KDE Config File
[mozilla.lsm]
install_location=
dist=true
install=false
type=DATA
[Config for BinMakefileAm]
ldflags=
cxxflags=-O0 -g3 -Wall
bin_program=mozilla
[po/Makefile.am]
sub_dirs=
type=po
[LFV Groups]
Dialogs=*.kdevdlg,
Others=*,
Translations=*.po,
groups=Headers,Sources,Dialogs,Translations,Others,
Sources=*.cpp,*.c,*.cc,*.C,*.cxx,*.ec,*.ecpp,*.lxx,*.l++,*.ll,*.l,
Headers=*.h,*.hh,*.hxx,*.hpp,*.H,
[mozilla.kdevprj]
install_location=
dist=true
install=false
type=DATA
[mozilla/docs/en/Makefile.am]
sub_dirs=
type=normal
[mozilla/Makefile.am]
sub_dirs=
type=prog_main
[General]
makefiles=Makefile.am,mozilla/Makefile.am,mozilla/docs/Makefile.am,mozilla/docs/en/Makefile.am,po/Makefile.am,
version_control=CVS
author=Heikki Toivonen
project_type=normal_empty
sub_dir=mozilla/
version=0.1
project_name=Mozilla
email=heikki@netscape.com
kdevprj_version=1.2
[Makefile.am]
files=mozilla.kdevprj,mozilla.lsm,
sub_dirs=mozilla,
type=normal
[mozilla/docs/Makefile.am]
sub_dirs=
type=normal

14
mozilla/mozilla.lsm Normal file
View File

@@ -0,0 +1,14 @@
Begin3
Title: Mozilla
Version: 0.1
Entered-date:
Description:
Keywords:
Author: Heikki Toivonen <heikki@netscape.com>
Maintained-by: Heikki Toivonen <heikki@netscape.com>
Primary-site:
Home-page: http://
Original-site:
Platforms: Linux and other Unices
Copying-policy: GNU Public License
End

View File

@@ -0,0 +1,20 @@
/*
* 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.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/

View File

@@ -0,0 +1,20 @@
/*
* 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.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/