1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

Gnter Knauf's NetWare changes.

This commit is contained in:
Daniel Stenberg 2004-03-17 12:46:42 +00:00
parent 3417e0b0fc
commit 5b55f9ecb3
20 changed files with 1939 additions and 7 deletions

View File

@ -6,6 +6,10 @@
Changelog Changelog
Daniel (17 March 2004)
- Günter Knauf brought patches, code and makefiles to build curl on Novell
NetWare.
Daniel (15 March 2004) Daniel (15 March 2004)
- Lots of libcurl man pages were updated to contain references to other man - Lots of libcurl man pages were updated to contain references to other man
pages the recognized way so that they appear as nice hyperlinks in the HTML pages the recognized way so that they appear as nice hyperlinks in the HTML

View File

@ -81,7 +81,9 @@ amiga:
cd ./lib && make -f makefile.amiga cd ./lib && make -f makefile.amiga
cd ./src && make -f makefile.amiga cd ./src && make -f makefile.amiga
netware:
cd lib && make -f Makefile.netware
cd src && make -f Makefile.netware
unix: all unix: all

View File

@ -26,6 +26,7 @@ This release includes the following changes:
This release includes the following bugfixes: This release includes the following bugfixes:
o builds and runs on Novell NetWare
o Windows builds now report OS as "i386-pc-win32" o Windows builds now report OS as "i386-pc-win32"
o received signals during SSL connect is handled better o received signals during SSL connect is handled better
o improved PUT/POST with NTLM/Digest authentication o improved PUT/POST with NTLM/Digest authentication
@ -83,6 +84,6 @@ advice from friends like these:
Ken Hirsch, Stadler Stephan, Domenico Andreoli, Patrick Smith, Tor Arntsen, Ken Hirsch, Stadler Stephan, Domenico Andreoli, Patrick Smith, Tor Arntsen,
Andrés García, Tim Baker, Len Krause, Gilad, Ken Rastatter, P R Schaffner, Andrés García, Tim Baker, Len Krause, Gilad, Ken Rastatter, P R Schaffner,
Greg Hewgill, Ben Greear, Jeff Lawson, Grigory Entin, Doug Porter, David Greg Hewgill, Ben Greear, Jeff Lawson, Grigory Entin, Doug Porter, David
Byron, Andy Serpa, Joe Halpin, Christopher R. Palmer Byron, Andy Serpa, Joe Halpin, Christopher R. Palmer, Günter Knauf
Thanks! (and sorry if I forgot to mention someone) Thanks! (and sorry if I forgot to mention someone)

View File

@ -511,6 +511,7 @@ PORTS
- i386 HURD - i386 HURD
- i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4 - i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4
- i386 NetBSD - i386 NetBSD
- i386 Novell NetWare
- i386 OS/2 - i386 OS/2
- i386 OpenBSD - i386 OpenBSD
- i386 SCO unix - i386 SCO unix

View File

@ -55,10 +55,10 @@
#include <winsock2.h> #include <winsock2.h>
#else #else
#ifdef _AIX
/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
libc5-based Linux systems. Only include it on system that are known to libc5-based Linux systems. Only include it on system that are known to
require it! */ require it! */
#if defined(_AIX) || defined(NETWARE)
#include <sys/select.h> #include <sys/select.h>
#endif #endif

277
lib/Makefile.netware Normal file
View File

@ -0,0 +1,277 @@
#################################################################
#
## Makefile for building libcurl.nlm (NetWare version - gnu make)
## Use: make -f Makefile.netware
##
## Comments to: Guenter Knauf <eflash@gmx.net>
#
#################################################################
# Edit the path below to point to the base of your Novell NDK.
BASE = c:/novell
INSTDIR = s:/libcurl
# Edit the path below to point to the base of your Zlib sources.
ZLIB_PATH = ../../../cw/zlib-src-1.1.4
# Edit the vars below to change NLM target settings.
TARGET = libcurl
VERSION = $(LIBCURL_VERSION)
COPYR = Copyright (c) 1996 - 2004, Daniel Stenberg, <daniel@haxx.se>
DESCR = cURL libcurl $(LIBCURL_VERSION_STR) - http://curl.haxx.se
MTSAFE = YES
STACK = 64000
SCREEN = none
#MODULES = libz.nlm
EXPORTS = @libcurl.imp
# Edit the var below to point to your lib architecture.
ifndef LIBARCH
LIBARCH = LIBC
endif
# must be equal to DEBUG or NDEBUG
DB = NDEBUG
# DB = DEBUG
# Optimization: -O<n> or debugging: -g
ifeq ($(DB),NDEBUG)
OPT = -O2
OBJDIR = release
else
OPT = -g
OBJDIR = debug
endif
# Include the version info retrieved from jk_version.h
-include $(OBJDIR)/version.inc
# The following line defines your compiler.
ifdef METROWERKS
CC = mwccnlm
else
CC = gcc
endif
# RM = rm -f
# CP = cp -fv
# if you want to mark the target as MTSAFE you will need a tool for
# generating the xdc data for the linker; here's a minimal tool:
# http://www.gknw.de/development/prgtools/mkxdc.zip
MPKXDC = mkxdc
# Global flags for all compilers
CFLAGS = $(OPT) -D$(DB) -DNETWARE -nostdinc
#CFLAGS += -DHAVE_LIBZ
ifeq ($(CC),mwccnlm)
LD = mwldnlm
LDFLAGS = -nostdlib $(PRELUDE) $(OBJDIR)/*.o -o $(OBJDIR)/$(TARGET).nlm -commandfile
CFLAGS += -gccinc -inline off -opt nointrinsics
CFLAGS += -relax_pointers
#CFLAGS += -w on
ifeq ($(LIBARCH),LIBC)
PRELUDE = $(SDK_LIBC)/imports/libcpre.o
CFLAGS += -align 4 -inst mmx -proc 686
CFLAGS += -D_POSIX_SOURCE
# CFLAGS += -D__ANSIC__
else
PRELUDE = "$(METROWERKS)/Novell Support/libraries/runtime/prelude.obj"
# CFLAGS += -include "$(METROWERKS)/Novell Support/headers/nlm_prefix.h"
CFLAGS += -align 1 -proc 586
endif
else
LD = nlmconv
LDFLAGS = -T
CFLAGS += -fno-builtin -fpack-struct -fpcc-struct-return
CFLAGS += -Wall # -pedantic
ifeq ($(LIBARCH),LIBC)
PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
CFLAGS += -D_POSIX_SOURCE
# CFLAGS += -D__ANSIC__
else
PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
CFLAGS += -include $(BASE)/nlmconv/genlm.h
endif
endif
LDLIBS =
NDK_ROOT = $(BASE)/ndk
SDK_CLIB = $(NDK_ROOT)/nwsdk
SDK_LIBC = $(NDK_ROOT)/libc
SDK_LDAP = $(NDK_ROOT)/cldapsdk/netware
CURL_INC = ../include
INCLUDES = -I$(CURL_INC)
INCLUDES += -I$(ZLIB_PATH)
ifeq ($(LIBARCH),LIBC)
INCLUDES += -I$(SDK_LIBC)/include -I$(SDK_LIBC)/include/nks
INCLUDES += -I$(SDK_LIBC)/include/winsock
INCLUDES += -I$(SDK_LDAP)/libc/inc
else
INCLUDES += -I$(SDK_CLIB)/include/nlm -I$(SDK_CLIB)/include
# INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete
INCLUDES += -I$(SDK_LDAP)/clib/inc
CFLAGS += -DNETDB_USE_INTERNET
endif
CFLAGS += $(INCLUDES)
ifeq ($(MTSAFE),YES)
XDCDATA = $(OBJDIR)/$(TARGET).xdc
endif
ifeq ($(OSTYPE),linux)
DL = '
-include $(BASE)/nlmconv/ncpfs.inc
endif
OBJS = \
$(OBJDIR)/file.o \
$(OBJDIR)/timeval.o \
$(OBJDIR)/base64.o \
$(OBJDIR)/hostip.o \
$(OBJDIR)/progress.o \
$(OBJDIR)/formdata.o \
$(OBJDIR)/cookie.o \
$(OBJDIR)/http.o \
$(OBJDIR)/sendf.o \
$(OBJDIR)/ftp.o \
$(OBJDIR)/url.o \
$(OBJDIR)/dict.o \
$(OBJDIR)/if2ip.o \
$(OBJDIR)/speedcheck.o \
$(OBJDIR)/getdate.o \
$(OBJDIR)/transfer.o \
$(OBJDIR)/ldap.o \
$(OBJDIR)/ssluse.o \
$(OBJDIR)/version.o \
$(OBJDIR)/getenv.o \
$(OBJDIR)/escape.o \
$(OBJDIR)/mprintf.o \
$(OBJDIR)/telnet.o \
$(OBJDIR)/netrc.o \
$(OBJDIR)/getinfo.o \
$(OBJDIR)/strequal.o \
$(OBJDIR)/easy.o \
$(OBJDIR)/security.o \
$(OBJDIR)/krb4.o \
$(OBJDIR)/memdebug.o \
$(OBJDIR)/http_chunks.o \
$(OBJDIR)/strtok.o \
$(OBJDIR)/connect.o \
$(OBJDIR)/hash.o \
$(OBJDIR)/llist.o \
$(OBJDIR)/multi.o \
$(OBJDIR)/share.o \
$(OBJDIR)/content_encoding.o \
$(OBJDIR)/http_digest.o \
$(OBJDIR)/http_negotiate.o \
$(OBJDIR)/http_ntlm.o \
$(OBJDIR)/md5.o \
$(OBJDIR)/strtoofft.o \
$(OBJDIR)/nwlib.o
all: $(OBJDIR) $(OBJDIR)/version.inc $(OBJDIR)/$(TARGET).nlm
$(OBJDIR)/%.o: %.c
@echo Compiling $<
@$(CC) $(CFLAGS) -c $< -o $@
$(OBJDIR)/version.inc: $(CURL_INC)/curl/curl.h $(OBJDIR)
@echo Creating $@
@awk -f ../packages/netware/get_ver.awk $< > $@
dist: all
-$(RM) $(OBJDIR)/*.o $(OBJDIR)/$(TARGET).map $(OBJDIR)/$(TARGET).ncv
-$(RM) $(OBJDIR)/$(TARGET).def $(OBJDIR)/version.inc $(XDCDATA)
# -$(CP) ../changes.txt $(OBJDIR)/
install: all
@[ -d $(INSTDIR) ] || mkdir $(INSTDIR)
@$(CP) $(TARGET).nlm $(INSTDIR)
clean:
-$(RM) -r $(OBJDIR)
$(OBJDIR):
@mkdir $(OBJDIR)
$(OBJDIR)/$(TARGET).nlm: $(OBJS) $(OBJDIR)/$(TARGET).def $(XDCDATA)
@echo Linking $@
@-$(RM) $@
@$(LD) $(LDFLAGS) $(OBJDIR)/$(TARGET).def
$(OBJDIR)/%.xdc: Makefile.netware
@echo Creating $@
@$(MPKXDC) $(XDCOPT) $@
$(OBJDIR)/%.def: Makefile.netware
@echo $(DL)# DEF file for linking with $(LD)$(DL) > $@
@echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@
@echo $(DL)# All your changes will be lost!!$(DL) >> $@
@echo $(DL)#$(DL) >> $@
@echo $(DL)copyright "$(COPYR)"$(DL) >> $@
@echo $(DL)description "$(DESCR)"$(DL) >> $@
@echo $(DL)version $(VERSION)$(DL) >> $@
ifdef NLMTYPE
@echo $(DL)type $(NLMTYPE)$(DL) >> $@
endif
ifdef STACK
@echo $(DL)stack $(STACK)$(DL) >> $@
endif
ifdef SCREEN
@echo $(DL)screenname "$(SCREEN)"$(DL) >> $@
else
@echo $(DL)screenname "DEFAULT"$(DL) >> $@
endif
ifeq ($(DB),DEBUG)
@echo $(DL)debug$(DL) >> $@
endif
@echo $(DL)threadname "$(TARGET)"$(DL) >> $@
ifdef XDCDATA
@echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
endif
ifeq ($(LIBARCH),CLIB)
@echo $(DL)start _Prelude$(DL) >> $@
@echo $(DL)exit _Stop$(DL) >> $@
@echo $(DL)import @$(SDK_CLIB)/imports/clib.imp$(DL) >> $@
@echo $(DL)import @$(SDK_CLIB)/imports/threads.imp$(DL) >> $@
@echo $(DL)import @$(SDK_CLIB)/imports/nlmlib.imp$(DL) >> $@
@echo $(DL)import @$(SDK_CLIB)/imports/socklib.imp$(DL) >> $@
@echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapsdk.imp$(DL) >> $@
@echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapssl.imp$(DL) >> $@
@echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
@echo $(DL)module clib$(DL) >> $@
else
ifeq ($(LD),nlmconv)
@echo $(DL)flag_on 64$(DL) >> $@
else
@echo $(DL)autounload$(DL) >> $@
endif
@echo $(DL)pseudopreemption$(DL) >> $@
@echo $(DL)start _LibCPrelude$(DL) >> $@
@echo $(DL)exit _LibCPostlude$(DL) >> $@
@echo $(DL)check _LibCCheckUnload$(DL) >> $@
@echo $(DL)import @$(SDK_LIBC)/imports/libc.imp$(DL) >> $@
@echo $(DL)import @$(SDK_LIBC)/imports/netware.imp$(DL) >> $@
@echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapsdk.imp$(DL) >> $@
@echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapssl.imp$(DL) >> $@
@echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapx.imp$(DL) >> $@
@echo $(DL)module libc$(DL) >> $@
endif
ifdef MODULES
@echo $(DL)module $(MODULES)$(DL) >> $@
endif
ifdef EXPORTS
@echo $(DL)export $(EXPORTS)$(DL) >> $@
endif
ifdef IMPORTS
@echo $(DL)import $(IMPORTS)$(DL) >> $@
endif
ifeq ($(LD),nlmconv)
@echo $(DL)input $(OBJS)$(DL) >> $@
@echo $(DL)input $(PRELUDE)$(DL) >> $@
@echo $(DL)output $(TARGET).nlm$(DL) >> $@
endif

485
lib/config-netware.h Normal file
View File

@ -0,0 +1,485 @@
/* lib/config.h.in. Generated from configure.ac by autoheader. */
/* to disable DICT */
#undef CURL_DISABLE_DICT
/* to disable FILE */
#undef CURL_DISABLE_FILE
/* to disable FTP */
#undef CURL_DISABLE_FTP
/* to disable GOPHER */
#undef CURL_DISABLE_GOPHER
/* to disable HTTP */
#undef CURL_DISABLE_HTTP
/* to disable LDAP */
#undef CURL_DISABLE_LDAP
/* to disable TELNET */
#undef CURL_DISABLE_TELNET
/* Set to explicitly specify we don't want to use thread-safe functions */
#undef DISABLED_THREADSAFE
/* your Entropy Gathering Daemon socket pathname */
#undef EGD_SOCKET
/* Define if you want to enable IPv6 support */
#undef ENABLE_IPV6
/* Define to 1 if you have the <alloca.h> header file. */
#undef HAVE_ALLOCA_H
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
/* Define to 1 if you have the <assert.h> header file. */
#define HAVE_ASSERT_H 1
/* Define to 1 if you have the `closesocket' function. */
#undef HAVE_CLOSESOCKET
/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
/* Define to 1 if you have the <crypto.h> header file. */
#undef HAVE_CRYPTO_H
/* Define to 1 if you have the <des.h> header file. */
#undef HAVE_DES_H
/* disabled non-blocking sockets */
#undef HAVE_DISABLED_NONBLOCKING
/* Define to 1 if you have the <dlfcn.h> header file. */
/* XXX: #undef HAVE_DLFCN_H */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the `dlopen' function. */
#define HAVE_DLOPEN 1
/* Define to 1 if you have the <err.h> header file. */
#define HAVE_ERR_H 1
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* use FIONBIO for non-blocking sockets */
/* XXX: #undef HAVE_FIONBIO */
#define HAVE_FIONBIO 1
/* Define if getaddrinfo exists and works */
#undef HAVE_GETADDRINFO
/* Define to 1 if you have the `geteuid' function. */
#undef HAVE_GETEUID
/* Define to 1 if you have the `gethostbyaddr' function. */
#define HAVE_GETHOSTBYADDR 1
/* Define to 1 if you have the `gethostbyaddr_r' function. */
#undef HAVE_GETHOSTBYADDR_R
/* gethostbyaddr_r() takes 5 args */
#undef HAVE_GETHOSTBYADDR_R_5
/* gethostbyaddr_r() takes 7 args */
#undef HAVE_GETHOSTBYADDR_R_7
/* gethostbyaddr_r() takes 8 args */
#undef HAVE_GETHOSTBYADDR_R_8
/* Define to 1 if you have the `gethostbyname_r' function. */
#undef HAVE_GETHOSTBYNAME_R
/* gethostbyname_r() takes 3 args */
#undef HAVE_GETHOSTBYNAME_R_3
/* gethostbyname_r() takes 5 args */
#undef HAVE_GETHOSTBYNAME_R_5
/* gethostbyname_r() takes 6 args */
#undef HAVE_GETHOSTBYNAME_R_6
/* Define to 1 if you have the `getpass_r' function. */
#undef HAVE_GETPASS_R
/* Define to 1 if you have the `getpwuid' function. */
#undef HAVE_GETPWUID
/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1
/* Define to 1 if you have the `gmtime_r' function. */
#undef HAVE_GMTIME_R
/* if you have the gssapi libraries */
#undef HAVE_GSSAPI
/* if you have the Heimdal gssapi libraries */
#undef HAVE_GSSHEIMDAL
/* if you have the MIT gssapi libraries */
#undef HAVE_GSSMIT
/* Define to 1 if you have the `inet_addr' function. */
#define HAVE_INET_ADDR 1
/* Define to 1 if you have the `inet_ntoa' function. */
#define HAVE_INET_NTOA 1
/* Define to 1 if you have the `inet_ntoa_r' function. */
#undef HAVE_INET_NTOA_R
/* inet_ntoa_r() is declared */
#undef HAVE_INET_NTOA_R_DECL
/* Define to 1 if you have the `inet_pton' function. */
#define HAVE_INET_PTON 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* use ioctlsocket() for non-blocking sockets */
#undef HAVE_IOCTLSOCKET
/* use Ioctlsocket() for non-blocking sockets */
#undef HAVE_IOCTLSOCKET_CASE
/* Define to 1 if you have the <io.h> header file. */
#undef HAVE_IO_H
/* if you have the Kerberos4 libraries (including -ldes) */
#undef HAVE_KRB4
/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */
#undef HAVE_KRB_GET_OUR_IP_FOR_REALM
/* Define to 1 if you have the <krb.h> header file. */
#undef HAVE_KRB_H
/* Define to 1 if you have the `crypto' library (-lcrypto). */
#undef HAVE_LIBCRYPTO
/* Define to 1 if you have the `dl' library (-ldl). */
#undef HAVE_LIBDL
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
/* Define to 1 if you have the `resolv' library (-lresolv). */
#undef HAVE_LIBRESOLV
/* Define to 1 if you have the `resolve' library (-lresolve). */
#undef HAVE_LIBRESOLVE
/* Define to 1 if you have the `socket' library (-lsocket). */
#undef HAVE_LIBSOCKET
/* Define to 1 if you have the `ssl' library (-lssl). */
#undef HAVE_LIBSSL
/* If zlib is available */
#undef HAVE_LIBZ
//#define HAVE_LIBZ 1
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R
/* if your compiler supports 'long long' */
#define HAVE_LONGLONG 1
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <net/if.h> header file. */
#undef HAVE_NET_IF_H
/* Define to 1 if you have the <openssl/crypto.h> header file. */
#undef HAVE_OPENSSL_CRYPTO_H
/* Define to 1 if you have the <openssl/engine.h> header file. */
#undef HAVE_OPENSSL_ENGINE_H
/* Define to 1 if you have the <openssl/err.h> header file. */
#undef HAVE_OPENSSL_ERR_H
/* Define to 1 if you have the <openssl/pem.h> header file. */
#undef HAVE_OPENSSL_PEM_H
/* Define to 1 if you have the <openssl/rsa.h> header file. */
#undef HAVE_OPENSSL_RSA_H
/* Define to 1 if you have the <openssl/ssl.h> header file. */
#undef HAVE_OPENSSL_SSL_H
/* Define to 1 if you have the <openssl/x509.h> header file. */
#undef HAVE_OPENSSL_X509_H
/* use O_NONBLOCK for non-blocking sockets */
#undef HAVE_O_NONBLOCK
/* Define to 1 if you have the <pem.h> header file. */
#undef HAVE_PEM_H
/* Define to 1 if you have the `perror' function. */
#undef HAVE_PERROR
/* Define to 1 if you have the `poll' function. */
#undef HAVE_POLL
/* Define to 1 if you have the <pwd.h> header file. */
#undef HAVE_PWD_H
/* Define to 1 if you have the `RAND_egd' function. */
#undef HAVE_RAND_EGD
/* Define to 1 if you have the `RAND_screen' function. */
#undef HAVE_RAND_SCREEN
/* Define to 1 if you have the `RAND_status' function. */
#undef HAVE_RAND_STATUS
/* Define to 1 if you have the <rsa.h> header file. */
#undef HAVE_RSA_H
/* Define to 1 if you have the `select' function. */
#define HAVE_SELECT 1
/* Define to 1 if you have the <setjmp.h> header file. */
#define HAVE_SETJMP_H 1
/* Define to 1 if you have the <sgtty.h> header file. */
#undef HAVE_SGTTY_H
/* Define to 1 if you have the `sigaction' function. */
#undef HAVE_SIGACTION
/* Define to 1 if you have the `siginterrupt' function. */
#undef HAVE_SIGINTERRUPT
/* Define to 1 if you have the `signal' function. */
#define HAVE_SIGNAL 1
/* If you have sigsetjmp */
#undef HAVE_SIGSETJMP
/* Define to 1 if you have the `socket' function. */
#define HAVE_SOCKET 1
/* use SO_NONBLOCK for non-blocking sockets */
#undef HAVE_SO_NONBLOCK
/* Define this if you have the SPNEGO library fbopenssl */
#undef HAVE_SPNEGO
/* Define to 1 if you have the <ssl.h> header file. */
#undef HAVE_SSL_H
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1
/* Define to 1 if you have the `strcmpi' function. */
#undef HAVE_STRCMPI
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strftime' function. */
#define HAVE_STRFTIME 1
/* Define to 1 if you have the `stricmp' function. */
#undef HAVE_STRICMP
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strlcat' function. */
#define HAVE_STRLCAT 1
/* Define to 1 if you have the `strlcpy' function. */
#define HAVE_STRLCPY 1
/* Define to 1 if you have the `strstr' function. */
#define HAVE_STRSTR 1
/* Define to 1 if you have the `strtok_r' function. */
#undef HAVE_STRTOK_R
/* Define to 1 if you have the `strtoll' function. */
#undef HAVE_STRTOLL
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/poll.h> header file. */
#undef HAVE_SYS_POLL_H
/* Define to 1 if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/sockio.h> header file. */
#define HAVE_SYS_SOCKIO_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/utime.h> header file. */
#undef HAVE_SYS_UTIME_H
/* Define to 1 if you have the `tcgetattr' function. */
#undef HAVE_TCGETATTR
/* Define to 1 if you have the `tcsetattr' function. */
#undef HAVE_TCSETATTR
/* Define to 1 if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define to 1 if you have the <termio.h> header file. */
#undef HAVE_TERMIO_H
/* Define to 1 if you have the <time.h> header file. */
#define HAVE_TIME_H 1
/* Define to 1 if you have the `uname' function. */
#define HAVE_UNAME 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `utime' function. */
#undef HAVE_UTIME
/* Define to 1 if you have the <utime.h> header file. */
#undef HAVE_UTIME_H
/* Define to 1 if you have the <winsock.h> header file. */
#undef HAVE_WINSOCK_H
/* Define this symbol if your OS supports changing the contents of argv */
#undef HAVE_WRITABLE_ARGV
/* Define to 1 if you have the <x509.h> header file. */
#undef HAVE_X509_H
/* if you have the zlib.h header file */
#define HAVE_ZLIB_H 1
/* need REENTRANT defined */
#undef NEED_REENTRANT
/* cpu-machine-OS */
#define OS "i386-pc-NetWare"
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* a suitable file to read random data from */
#undef RANDOM_FILE
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
/* Define to the type of arg 1 for `select'. */
#undef SELECT_TYPE_ARG1
/* Define to the type of args 2, 3 and 4 for `select'. */
#undef SELECT_TYPE_ARG234
/* Define to the type of arg 5 for `select'. */
#undef SELECT_TYPE_ARG5
/* The size of a `curl_off_t', as computed by sizeof. */
#define SIZEOF_CURL_OFF_T 4
/* Define to 1 if you have the ANSI C header files. */
/* XXX: #undef STDC_HEADERS */
#define STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Define if you want to enable ares support */
#undef USE_ARES
/* Version number of package */
#undef VERSION
/* Define to 1 if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* type to use in place of in_addr_t if not defined */
#undef in_addr_t
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t
/* type to use in place of socklen_t if not defined */
#define socklen_t int
/* the signed version of size_t */
#undef ssize_t

View File

@ -52,6 +52,13 @@
#include <stdlib.h> /* required for free() prototype, without it, this crashes #include <stdlib.h> /* required for free() prototype, without it, this crashes
on macos 68K */ on macos 68K */
#endif #endif
#if (defined(HAVE_FIONBIO) && defined(__NOVELL_LIBC__))
#include <sys/filio.h>
#endif
#if (defined(NETWARE) && defined(__NOVELL_LIBC__))
#undef in_addr_t
#define in_addr_t unsigned long
#endif
#ifdef VMS #ifdef VMS
#include <in.h> #include <in.h>
#include <inet.h> #include <inet.h>

View File

@ -65,6 +65,11 @@
#include <errno.h> #include <errno.h>
#endif #endif
#if (defined(NETWARE) && defined(__NOVELL_LIBC__))
#undef in_addr_t
#define in_addr_t unsigned long
#endif
#include <curl/curl.h> #include <curl/curl.h>
#include "urldata.h" #include "urldata.h"
#include "sendf.h" #include "sendf.h"

View File

@ -60,6 +60,11 @@
#include <setjmp.h> #include <setjmp.h>
#endif #endif
#if (defined(NETWARE) && defined(__NOVELL_LIBC__))
#undef in_addr_t
#define in_addr_t unsigned long
#endif
#include "urldata.h" #include "urldata.h"
#include "sendf.h" #include "sendf.h"
#include "hostip.h" #include "hostip.h"

View File

@ -32,7 +32,7 @@
#endif #endif
#if !defined(WIN32) && !defined(__BEOS__) && !defined(__CYGWIN32__) && \ #if !defined(WIN32) && !defined(__BEOS__) && !defined(__CYGWIN32__) && \
!defined(__riscos__) && !defined(__INTERIX) !defined(__riscos__) && !defined(__INTERIX) && !defined(NETWARE)
#ifdef HAVE_SYS_SOCKET_H #ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h> #include <sys/socket.h>
@ -125,5 +125,8 @@ char *Curl_if2ip(char *interface, char *buf, int buf_size)
/* -- end of if2ip() -- */ /* -- end of if2ip() -- */
#else #else
#define if2ip(x) NULL char *Curl_if2ip(char *interface, char *buf, int buf_size)
{
return NULL;
}
#endif #endif

44
lib/libcurl.imp Normal file
View File

@ -0,0 +1,44 @@
#
# Definition file for the NLM version of the LIBCURL library from curl
#
# (LIBCURL)
curl_easy_cleanup,
curl_easy_getinfo,
curl_easy_init,
curl_easy_perform,
curl_easy_setopt,
curl_escape,
curl_unescape,
curl_formparse,
curl_formfree,
curl_getdate,
curl_getenv,
curl_global_cleanup,
curl_global_init,
curl_slist_append,
curl_slist_free_all,
curl_version,
curl_maprintf,
curl_mfprintf,
curl_mprintf,
curl_msprintf,
curl_msnprintf,
curl_mvfprintf,
curl_strequal,
curl_strnequal,
curl_easy_duphandle,
curl_formadd,
curl_multi_init,
curl_multi_add_handle,
curl_multi_remove_handle,
curl_multi_fdset,
curl_multi_perform,
curl_multi_cleanup,
curl_multi_info_read,
curl_free,
curl_version_info,
curl_share_init,
curl_share_setopt,
curl_share_cleanup

329
lib/nwlib.c Normal file
View File

@ -0,0 +1,329 @@
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
* $Id$
***************************************************************************/
/* This file is only used in the NetWare build */
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <library.h>
#include <netware.h>
#include <screen.h>
#include <nks/thread.h>
#include <nks/synch.h>
typedef struct
{
int _errno;
void *twentybytes;
} libthreaddata_t;
typedef struct
{
int x;
int y;
int z;
void *tenbytes;
NXKey_t perthreadkey; // if -1, no key obtained...
NXMutex_t *lock;
} libdata_t;
int gLibId = -1;
void *gLibHandle = (void *) NULL;
rtag_t gAllocTag = (rtag_t) NULL;
NXMutex_t *gLibLock = (NXMutex_t *) NULL;
// internal library function prototypes...
int DisposeLibraryData ( void * );
void DisposeThreadData ( void * );
int GetOrSetUpData ( int id, libdata_t **data, libthreaddata_t **threaddata );
int _NonAppStart
(
void *NLMHandle,
void *errorScreen,
const char *cmdLine,
const char *loadDirPath,
size_t uninitializedDataLength,
void *NLMFileHandle,
int (*readRoutineP)( int conn, void *fileHandle, size_t offset,
size_t nbytes, size_t *bytesRead, void *buffer ),
size_t customDataOffset,
size_t customDataSize,
int messageCount,
const char **messages
)
{
NX_LOCK_INFO_ALLOC(liblock, "Per-Application Data Lock", 0);
#ifndef __GNUC__
#pragma unused(cmdLine)
#pragma unused(loadDirPath)
#pragma unused(uninitializedDataLength)
#pragma unused(NLMFileHandle)
#pragma unused(readRoutineP)
#pragma unused(customDataOffset)
#pragma unused(customDataSize)
#pragma unused(messageCount)
#pragma unused(messages)
#endif
/*
** Here we process our command line, post errors (to the error screen),
** perform initializations and anything else we need to do before being able
** to accept calls into us. If we succeed, we return non-zero and the NetWare
** Loader will leave us up, otherwise we fail to load and get dumped.
*/
gAllocTag = AllocateResourceTag(NLMHandle,
"<library-name> memory allocations", AllocSignature);
if (!gAllocTag)
{
OutputToScreen(errorScreen, "Unable to allocate resource tag for "
"library memory allocations.\n");
return -1;
}
gLibId = register_library(DisposeLibraryData);
if (gLibId < -1)
{
OutputToScreen(errorScreen, "Unable to register library with kernel.\n");
return -1;
}
gLibHandle = NLMHandle;
gLibLock = NXMutexAlloc(0, 0, &liblock);
if (!gLibLock)
{
OutputToScreen(errorScreen, "Unable to allocate library data lock.\n");
return -1;
}
return 0;
}
void _NonAppStop( void )
{
/*
** Here we clean up any resources we allocated. Resource tags is a big part
** of what we created, but NetWare doesn't ask us to free those.
*/
(void) unregister_library(gLibId);
NXMutexFree(gLibLock);
}
int _NonAppCheckUnload( void )
{
/*
** This function cannot be the first in the file for if the file is linked
** first, then the check-unload function's offset will be nlmname.nlm+0
** which is how to tell that there isn't one. When the check function is
** first in the linked objects, it is ambiguous. For this reason, we will
** put it inside this file after the stop function.
**
** Here we check to see if it's alright to ourselves to be unloaded. If not,
** we return a non-zero value. Right now, there isn't any reason not to allow
** it.
*/
return 0;
}
int GetOrSetUpData
(
int id,
libdata_t **appData,
libthreaddata_t **threadData
)
{
int err;
libdata_t *app_data;
libthreaddata_t *thread_data;
NXKey_t key;
// NXMutex_t *lock;
NX_LOCK_INFO_ALLOC(liblock, "Application Data Lock", 0);
err = 0;
thread_data = (libthreaddata_t *) NULL;
/*
** Attempt to get our data for the application calling us. This is where we
** store whatever application-specific information we need to carry in support
** of calling applications.
*/
app_data = (libdata_t *) get_app_data(id);
if (!app_data)
{
/*
** This application hasn't called us before; set up application AND per-thread
** data. Of course, just in case a thread from this same application is calling
** us simultaneously, we better lock our application data-creation mutex. We
** also need to recheck for data after we acquire the lock because WE might be
** that other thread that was too late to create the data and the first thread
** in will have created it.
*/
NXLock(gLibLock);
if (!(app_data = (libdata_t *) get_app_data(id)))
{
app_data = (libdata_t *) malloc(sizeof(libdata_t));
if (app_data)
{
memset(app_data, 0, sizeof(libdata_t));
app_data->tenbytes = malloc(10);
app_data->lock = NXMutexAlloc(0, 0, &liblock);
if (!app_data->tenbytes || !app_data->lock)
{
if (app_data->lock)
NXMutexFree(app_data->lock);
free(app_data);
app_data = (libdata_t *) NULL;
err = ENOMEM;
}
if (app_data)
{
/*
** Here we burn in the application data that we were trying to get by calling
** get_app_data(). Next time we call the first function, we'll get this data
** we're just now setting. We also go on here to establish the per-thread data
** for the calling thread, something we'll have to do on each application
** thread the first time it calls us.
*/
err = set_app_data(gLibId, app_data);
if (err)
{
free(app_data);
app_data = (libdata_t *) NULL;
err = ENOMEM;
}
else
{
// create key for thread-specific data...
err = NXKeyCreate(DisposeThreadData, (void *) NULL, &key);
if (err) // (no more keys left?)
key = -1;
app_data->perthreadkey = key;
}
}
}
}
NXUnlock(gLibLock);
}
if (app_data)
{
key = app_data->perthreadkey;
if ( key != -1 // couldn't create a key? no thread data
&& !(err = NXKeyGetValue(key, (void **) &thread_data))
&& !thread_data)
{
/*
** Allocate the per-thread data for the calling thread. Regardless of whether
** there was already application data or not, this may be the first call by a
** a new thread. The fact that we allocation 20 bytes on a pointer is not very
** important, this just helps to demonstrate that we can have arbitrarily
** complex per-thread data.
*/
thread_data = (libthreaddata_t *) malloc(sizeof(libthreaddata_t));
if (thread_data)
{
thread_data->_errno = 0;
thread_data->twentybytes = malloc(20);
if (!thread_data->twentybytes)
{
free(thread_data);
thread_data = (libthreaddata_t *) NULL;
err = ENOMEM;
}
if ((err = NXKeySetValue(key, thread_data)))
{
free(thread_data->twentybytes);
free(thread_data);
thread_data = (libthreaddata_t *) NULL;
}
}
}
}
if (appData)
*appData = app_data;
if (threadData)
*threadData = thread_data;
return err;
}
int DisposeLibraryData
(
void *data
)
{
if (data)
{
void *tenbytes = ((libdata_t *) data)->tenbytes;
if (tenbytes)
free(tenbytes);
free(data);
}
return 0;
}
void DisposeThreadData
(
void *data
)
{
if (data)
{
void *twentybytes = ((libthreaddata_t *) data)->twentybytes;
if (twentybytes)
free(twentybytes);
free(data);
}
}

View File

@ -50,6 +50,10 @@
/* hand-modified VMS config.h! */ /* hand-modified VMS config.h! */
#include "config-vms.h" #include "config-vms.h"
#endif #endif
#ifdef NETWARE
/* hand-modified NetWare config.h! */
#include "config-netware.h"
#endif
#ifdef macintosh #ifdef macintosh
/* hand-modified MacOS config.h! */ /* hand-modified MacOS config.h! */
#include "config-mac.h" #include "config-mac.h"
@ -290,4 +294,8 @@ typedef struct in_addr Curl_ipconnect;
#endif #endif
#endif #endif
#ifdef NETWARE
#undef HAVE_ALARM
#endif
#endif /* __CONFIG_H */ #endif /* __CONFIG_H */

View File

@ -1,3 +1,3 @@
SUBDIRS = Win32 Linux Solaris EPM DOS vms SUBDIRS = Win32 Linux Solaris EPM DOS vms
EXTRA_DIST = README EXTRA_DIST = README NetWare/get_ver.awk

View File

@ -0,0 +1,20 @@
# fetch libcurl version number from input file and write them to STDOUT
BEGIN {
while ((getline < ARGV[1]) > 0) {
if (match ($0, /^#define LIBCURL_VERSION_MAJOR [^"]+/)) {
libcurl_ver_major = substr($3, 1, length($3));
}
else if (match ($0, /^#define LIBCURL_VERSION_MINOR [^"]+/)) {
libcurl_ver_minor = substr($3, 1, length($3));
}
else if (match ($0, /^#define LIBCURL_VERSION_PATCH [^"]+/)) {
libcurl_ver_patch = substr($3, 1, length($3));
}
}
libcurl_ver = libcurl_ver_major "," libcurl_ver_minor "," libcurl_ver_patch;
libcurl_ver_str = libcurl_ver_major "." libcurl_ver_minor "." libcurl_ver_patch;
print "LIBCURL_VERSION = " libcurl_ver "";
print "LIBCURL_VERSION_STR = " libcurl_ver_str "";
}

240
src/Makefile.netware Normal file
View File

@ -0,0 +1,240 @@
#################################################################
#
## Makefile for building curl.nlm (NetWare version - gnu make)
## Use: make -f Makefile.netware
##
## Comments to: Guenter Knauf <eflash@gmx.net>
#
#################################################################
# Edit the path below to point to the base of your Novell NDK.
BASE = c:/novell
INSTDIR = s:/libcurl
# Edit the path below to point to the base of your Zlib sources.
ZLIB_PATH = ../../../cw/zlib-src-1.1.4
# Edit the vars below to change NLM target settings.
TARGET = curl
VERSION = $(LIBCURL_VERSION)
COPYR = Copyright (c) 1996 - 2004, Daniel Stenberg, <daniel@haxx.se>
DESCR = cURL $(LIBCURL_VERSION_STR) - http://curl.haxx.se
MTSAFE = YES
STACK = 64000
SCREEN = $(TARGET) commandline utility
MODULES = libcurl.nlm
IMPORTS = @../lib/libcurl.imp
# Edit the var below to point to your lib architecture.
ifndef LIBARCH
LIBARCH = LIBC
endif
# must be equal to DEBUG or NDEBUG
DB = NDEBUG
# DB = DEBUG
# Optimization: -O<n> or debugging: -g
ifeq ($(DB),NDEBUG)
OPT = -O2
OBJDIR = release
else
OPT = -g
OBJDIR = debug
endif
# Include the version info retrieved from jk_version.h
-include $(OBJDIR)/version.inc
# The following line defines your compiler.
ifdef METROWERKS
CC = mwccnlm
else
CC = gcc
endif
# RM = rm -f
# CP = cp -fv
# if you want to mark the target as MTSAFE you will need a tool for
# generating the xdc data for the linker; here's a minimal tool:
# http://www.gknw.de/development/prgtools/mkxdc.zip
MPKXDC = mkxdc
# Global flags for all compilers
CFLAGS = $(OPT) -D$(DB) -DNETWARE -nostdinc
CFLAGS += -DUSE_MANUAL
#CFLAGS += -DHAVE_LIBZ
ifeq ($(CC),mwccnlm)
LD = mwldnlm
LDFLAGS = -nostdlib $(PRELUDE) $(OBJDIR)/*.o -o $(OBJDIR)/$(TARGET).nlm -commandfile
CFLAGS += -gccinc -inline off -opt nointrinsics
CFLAGS += -relax_pointers
#CFLAGS += -w on
ifeq ($(LIBARCH),LIBC)
PRELUDE = $(SDK_LIBC)/imports/libcpre.o
CFLAGS += -align 4 -inst mmx -proc 686
CFLAGS += -D_POSIX_SOURCE
# CFLAGS += -D__ANSIC__
else
PRELUDE = "$(METROWERKS)/Novell Support/libraries/runtime/prelude.obj"
# CFLAGS += -include "$(METROWERKS)/Novell Support/headers/nlm_prefix.h"
CFLAGS += -align 1 -proc 586
endif
else
LD = nlmconv
LDFLAGS = -T
CFLAGS += -fno-builtin -fpack-struct -fpcc-struct-return
CFLAGS += -Wall #-Wno-main # -pedantic
ifeq ($(LIBARCH),LIBC)
PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
CFLAGS += -D_POSIX_SOURCE
# CFLAGS += -D__ANSIC__
else
PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
CFLAGS += -include $(BASE)/nlmconv/genlm.h
endif
endif
LDLIBS =
NDK_ROOT = $(BASE)/ndk
SDK_CLIB = $(NDK_ROOT)/nwsdk
SDK_LIBC = $(NDK_ROOT)/libc
SDK_LDAP = $(NDK_ROOT)/cldapsdk/netware
CURL_INC = ../include
CURL_LIB = ../lib
INCLUDES = -I$(CURL_INC) -I$(CURL_LIB)
INCLUDES += -I$(ZLIB_PATH)
ifeq ($(LIBARCH),LIBC)
INCLUDES += -I$(SDK_LIBC)/include -I$(SDK_LIBC)/include/nks
INCLUDES += -I$(SDK_LIBC)/include/winsock
INCLUDES += -I$(SDK_LDAP)/libc/inc
else
INCLUDES += -I$(SDK_CLIB)/include/nlm -I$(SDK_CLIB)/include
INCLUDES += -I$(SDK_LDAP)/clib/inc
CFLAGS += -DNETDB_USE_INTERNET
endif
CFLAGS += $(INCLUDES)
ifeq ($(MTSAFE),YES)
XDCDATA = $(OBJDIR)/$(TARGET).xdc
endif
ifeq ($(OSTYPE),linux)
DL = '
-include $(BASE)/nlmconv/ncpfs.inc
endif
OBJS = \
$(OBJDIR)/main.o \
$(OBJDIR)/hugehelp.o \
$(OBJDIR)/urlglob.o \
$(OBJDIR)/writeout.o \
$(OBJDIR)/getpass.o \
$(OBJDIR)/homedir.o
all: $(OBJDIR) $(OBJDIR)/version.inc $(OBJDIR)/$(TARGET).nlm
$(OBJDIR)/%.o: %.c
@echo Compiling $<
@$(CC) $(CFLAGS) -c $< -o $@
$(OBJDIR)/version.inc: $(CURL_INC)/curl/curl.h $(OBJDIR)
@echo Creating $@
@awk -f ../packages/netware/get_ver.awk $< > $@
dist: all
-$(RM) $(OBJDIR)/*.o $(OBJDIR)/$(TARGET).map $(OBJDIR)/$(TARGET).ncv
-$(RM) $(OBJDIR)/$(TARGET).def $(OBJDIR)/version.inc $(XDCDATA)
# -$(CP) ../changes.txt $(OBJDIR)/
install: all
@[ -d $(INSTDIR) ] || mkdir $(INSTDIR)
@$(CP) $(TARGET).nlm $(INSTDIR)
clean:
-$(RM) -r $(OBJDIR)
$(OBJDIR):
@mkdir $(OBJDIR)
$(OBJDIR)/$(TARGET).nlm: $(OBJS) $(OBJDIR)/$(TARGET).def $(XDCDATA)
@echo Linking $@
@-$(RM) $@
@$(LD) $(LDFLAGS) $(OBJDIR)/$(TARGET).def
$(OBJDIR)/%.xdc: Makefile.netware
@echo Creating $@
@$(MPKXDC) $(XDCOPT) $@
$(OBJDIR)/%.def: Makefile.netware
@echo $(DL)# DEF file for linking with $(LD)$(DL) > $@
@echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@
@echo $(DL)# All your changes will be lost!!$(DL) >> $@
@echo $(DL)#$(DL) >> $@
@echo $(DL)copyright "$(COPYR)"$(DL) >> $@
@echo $(DL)description "$(DESCR)"$(DL) >> $@
@echo $(DL)version $(VERSION)$(DL) >> $@
ifdef NLMTYPE
@echo $(DL)type $(NLMTYPE)$(DL) >> $@
endif
ifdef STACK
@echo $(DL)stack $(STACK)$(DL) >> $@
endif
ifdef SCREEN
@echo $(DL)screenname "$(SCREEN)"$(DL) >> $@
else
@echo $(DL)screenname "DEFAULT"$(DL) >> $@
endif
ifeq ($(DB),DEBUG)
@echo $(DL)debug$(DL) >> $@
endif
@echo $(DL)threadname "$(TARGET)"$(DL) >> $@
ifdef XDCDATA
@echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
endif
ifeq ($(LIBARCH),CLIB)
@echo $(DL)start _Prelude$(DL) >> $@
@echo $(DL)exit _Stop$(DL) >> $@
@echo $(DL)import @$(SDK_CLIB)/imports/clib.imp$(DL) >> $@
@echo $(DL)import @$(SDK_CLIB)/imports/threads.imp$(DL) >> $@
@echo $(DL)import @$(SDK_CLIB)/imports/nlmlib.imp$(DL) >> $@
@echo $(DL)import @$(SDK_CLIB)/imports/socklib.imp$(DL) >> $@
@echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapsdk.imp$(DL) >> $@
@echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapssl.imp$(DL) >> $@
@echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
@echo $(DL)module clib$(DL) >> $@
else
ifeq ($(LD),nlmconv)
@echo $(DL)flag_on 64$(DL) >> $@
else
@echo $(DL)autounload$(DL) >> $@
endif
@echo $(DL)pseudopreemption$(DL) >> $@
@echo $(DL)start _LibCPrelude$(DL) >> $@
@echo $(DL)exit _LibCPostlude$(DL) >> $@
@echo $(DL)check _LibCCheckUnload$(DL) >> $@
@echo $(DL)import @$(SDK_LIBC)/imports/libc.imp$(DL) >> $@
@echo $(DL)import @$(SDK_LIBC)/imports/netware.imp$(DL) >> $@
@echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapsdk.imp$(DL) >> $@
@echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapssl.imp$(DL) >> $@
@echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapx.imp$(DL) >> $@
@echo $(DL)module libc$(DL) >> $@
endif
ifdef MODULES
@echo $(DL)module $(MODULES)$(DL) >> $@
endif
ifdef EXPORTS
@echo $(DL)export $(EXPORTS)$(DL) >> $@
endif
ifdef IMPORTS
@echo $(DL)import $(IMPORTS)$(DL) >> $@
endif
ifeq ($(LD),nlmconv)
@echo $(DL)input $(OBJS)$(DL) >> $@
@echo $(DL)input $(PRELUDE)$(DL) >> $@
@echo $(DL)output $(TARGET).nlm$(DL) >> $@
endif

485
src/config-netware.h Normal file
View File

@ -0,0 +1,485 @@
/* lib/config.h.in. Generated from configure.ac by autoheader. */
/* to disable DICT */
#undef CURL_DISABLE_DICT
/* to disable FILE */
#undef CURL_DISABLE_FILE
/* to disable FTP */
#undef CURL_DISABLE_FTP
/* to disable GOPHER */
#undef CURL_DISABLE_GOPHER
/* to disable HTTP */
#undef CURL_DISABLE_HTTP
/* to disable LDAP */
#undef CURL_DISABLE_LDAP
/* to disable TELNET */
#undef CURL_DISABLE_TELNET
/* Set to explicitly specify we don't want to use thread-safe functions */
#undef DISABLED_THREADSAFE
/* your Entropy Gathering Daemon socket pathname */
#undef EGD_SOCKET
/* Define if you want to enable IPv6 support */
#undef ENABLE_IPV6
/* Define to 1 if you have the <alloca.h> header file. */
#undef HAVE_ALLOCA_H
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
/* Define to 1 if you have the <assert.h> header file. */
#define HAVE_ASSERT_H 1
/* Define to 1 if you have the `closesocket' function. */
#undef HAVE_CLOSESOCKET
/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
/* Define to 1 if you have the <crypto.h> header file. */
#undef HAVE_CRYPTO_H
/* Define to 1 if you have the <des.h> header file. */
#undef HAVE_DES_H
/* disabled non-blocking sockets */
#undef HAVE_DISABLED_NONBLOCKING
/* Define to 1 if you have the <dlfcn.h> header file. */
/* XXX: #undef HAVE_DLFCN_H */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the `dlopen' function. */
#define HAVE_DLOPEN 1
/* Define to 1 if you have the <err.h> header file. */
#define HAVE_ERR_H 1
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* use FIONBIO for non-blocking sockets */
/* XXX: #undef HAVE_FIONBIO */
#define HAVE_FIONBIO 1
/* Define if getaddrinfo exists and works */
#undef HAVE_GETADDRINFO
/* Define to 1 if you have the `geteuid' function. */
#undef HAVE_GETEUID
/* Define to 1 if you have the `gethostbyaddr' function. */
#define HAVE_GETHOSTBYADDR 1
/* Define to 1 if you have the `gethostbyaddr_r' function. */
#undef HAVE_GETHOSTBYADDR_R
/* gethostbyaddr_r() takes 5 args */
#undef HAVE_GETHOSTBYADDR_R_5
/* gethostbyaddr_r() takes 7 args */
#undef HAVE_GETHOSTBYADDR_R_7
/* gethostbyaddr_r() takes 8 args */
#undef HAVE_GETHOSTBYADDR_R_8
/* Define to 1 if you have the `gethostbyname_r' function. */
#undef HAVE_GETHOSTBYNAME_R
/* gethostbyname_r() takes 3 args */
#undef HAVE_GETHOSTBYNAME_R_3
/* gethostbyname_r() takes 5 args */
#undef HAVE_GETHOSTBYNAME_R_5
/* gethostbyname_r() takes 6 args */
#undef HAVE_GETHOSTBYNAME_R_6
/* Define to 1 if you have the `getpass_r' function. */
#undef HAVE_GETPASS_R
/* Define to 1 if you have the `getpwuid' function. */
#undef HAVE_GETPWUID
/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1
/* Define to 1 if you have the `gmtime_r' function. */
#undef HAVE_GMTIME_R
/* if you have the gssapi libraries */
#undef HAVE_GSSAPI
/* if you have the Heimdal gssapi libraries */
#undef HAVE_GSSHEIMDAL
/* if you have the MIT gssapi libraries */
#undef HAVE_GSSMIT
/* Define to 1 if you have the `inet_addr' function. */
#define HAVE_INET_ADDR 1
/* Define to 1 if you have the `inet_ntoa' function. */
#define HAVE_INET_NTOA 1
/* Define to 1 if you have the `inet_ntoa_r' function. */
#undef HAVE_INET_NTOA_R
/* inet_ntoa_r() is declared */
#undef HAVE_INET_NTOA_R_DECL
/* Define to 1 if you have the `inet_pton' function. */
#define HAVE_INET_PTON 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* use ioctlsocket() for non-blocking sockets */
#undef HAVE_IOCTLSOCKET
/* use Ioctlsocket() for non-blocking sockets */
#undef HAVE_IOCTLSOCKET_CASE
/* Define to 1 if you have the <io.h> header file. */
#undef HAVE_IO_H
/* if you have the Kerberos4 libraries (including -ldes) */
#undef HAVE_KRB4
/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */
#undef HAVE_KRB_GET_OUR_IP_FOR_REALM
/* Define to 1 if you have the <krb.h> header file. */
#undef HAVE_KRB_H
/* Define to 1 if you have the `crypto' library (-lcrypto). */
#undef HAVE_LIBCRYPTO
/* Define to 1 if you have the `dl' library (-ldl). */
#undef HAVE_LIBDL
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
/* Define to 1 if you have the `resolv' library (-lresolv). */
#undef HAVE_LIBRESOLV
/* Define to 1 if you have the `resolve' library (-lresolve). */
#undef HAVE_LIBRESOLVE
/* Define to 1 if you have the `socket' library (-lsocket). */
#undef HAVE_LIBSOCKET
/* Define to 1 if you have the `ssl' library (-lssl). */
#undef HAVE_LIBSSL
/* If zlib is available */
#undef HAVE_LIBZ
//#define HAVE_LIBZ 1
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R
/* if your compiler supports 'long long' */
#define HAVE_LONGLONG 1
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* Define to 1 if you have the <net/if.h> header file. */
#undef HAVE_NET_IF_H
/* Define to 1 if you have the <openssl/crypto.h> header file. */
#undef HAVE_OPENSSL_CRYPTO_H
/* Define to 1 if you have the <openssl/engine.h> header file. */
#undef HAVE_OPENSSL_ENGINE_H
/* Define to 1 if you have the <openssl/err.h> header file. */
#undef HAVE_OPENSSL_ERR_H
/* Define to 1 if you have the <openssl/pem.h> header file. */
#undef HAVE_OPENSSL_PEM_H
/* Define to 1 if you have the <openssl/rsa.h> header file. */
#undef HAVE_OPENSSL_RSA_H
/* Define to 1 if you have the <openssl/ssl.h> header file. */
#undef HAVE_OPENSSL_SSL_H
/* Define to 1 if you have the <openssl/x509.h> header file. */
#undef HAVE_OPENSSL_X509_H
/* use O_NONBLOCK for non-blocking sockets */
#undef HAVE_O_NONBLOCK
/* Define to 1 if you have the <pem.h> header file. */
#undef HAVE_PEM_H
/* Define to 1 if you have the `perror' function. */
#undef HAVE_PERROR
/* Define to 1 if you have the `poll' function. */
#undef HAVE_POLL
/* Define to 1 if you have the <pwd.h> header file. */
#undef HAVE_PWD_H
/* Define to 1 if you have the `RAND_egd' function. */
#undef HAVE_RAND_EGD
/* Define to 1 if you have the `RAND_screen' function. */
#undef HAVE_RAND_SCREEN
/* Define to 1 if you have the `RAND_status' function. */
#undef HAVE_RAND_STATUS
/* Define to 1 if you have the <rsa.h> header file. */
#undef HAVE_RSA_H
/* Define to 1 if you have the `select' function. */
#define HAVE_SELECT 1
/* Define to 1 if you have the <setjmp.h> header file. */
#define HAVE_SETJMP_H 1
/* Define to 1 if you have the <sgtty.h> header file. */
#undef HAVE_SGTTY_H
/* Define to 1 if you have the `sigaction' function. */
#undef HAVE_SIGACTION
/* Define to 1 if you have the `siginterrupt' function. */
#undef HAVE_SIGINTERRUPT
/* Define to 1 if you have the `signal' function. */
#define HAVE_SIGNAL 1
/* If you have sigsetjmp */
#undef HAVE_SIGSETJMP
/* Define to 1 if you have the `socket' function. */
#define HAVE_SOCKET 1
/* use SO_NONBLOCK for non-blocking sockets */
#undef HAVE_SO_NONBLOCK
/* Define this if you have the SPNEGO library fbopenssl */
#undef HAVE_SPNEGO
/* Define to 1 if you have the <ssl.h> header file. */
#undef HAVE_SSL_H
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1
/* Define to 1 if you have the `strcmpi' function. */
#undef HAVE_STRCMPI
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `strftime' function. */
#define HAVE_STRFTIME 1
/* Define to 1 if you have the `stricmp' function. */
#undef HAVE_STRICMP
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strlcat' function. */
#define HAVE_STRLCAT 1
/* Define to 1 if you have the `strlcpy' function. */
#define HAVE_STRLCPY 1
/* Define to 1 if you have the `strstr' function. */
#define HAVE_STRSTR 1
/* Define to 1 if you have the `strtok_r' function. */
#undef HAVE_STRTOK_R
/* Define to 1 if you have the `strtoll' function. */
#undef HAVE_STRTOLL
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/poll.h> header file. */
#undef HAVE_SYS_POLL_H
/* Define to 1 if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/sockio.h> header file. */
#define HAVE_SYS_SOCKIO_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/utime.h> header file. */
#undef HAVE_SYS_UTIME_H
/* Define to 1 if you have the `tcgetattr' function. */
#undef HAVE_TCGETATTR
/* Define to 1 if you have the `tcsetattr' function. */
#undef HAVE_TCSETATTR
/* Define to 1 if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define to 1 if you have the <termio.h> header file. */
#undef HAVE_TERMIO_H
/* Define to 1 if you have the <time.h> header file. */
#define HAVE_TIME_H 1
/* Define to 1 if you have the `uname' function. */
#define HAVE_UNAME 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `utime' function. */
#define HAVE_UTIME 1
/* Define to 1 if you have the <utime.h> header file. */
#define HAVE_UTIME_H 1
/* Define to 1 if you have the <winsock.h> header file. */
#undef HAVE_WINSOCK_H
/* Define this symbol if your OS supports changing the contents of argv */
#undef HAVE_WRITABLE_ARGV
/* Define to 1 if you have the <x509.h> header file. */
#undef HAVE_X509_H
/* if you have the zlib.h header file */
#define HAVE_ZLIB_H 1
/* need REENTRANT defined */
#undef NEED_REENTRANT
/* cpu-machine-OS */
#define OS "i386-pc-NetWare"
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* a suitable file to read random data from */
#undef RANDOM_FILE
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
/* Define to the type of arg 1 for `select'. */
#undef SELECT_TYPE_ARG1
/* Define to the type of args 2, 3 and 4 for `select'. */
#undef SELECT_TYPE_ARG234
/* Define to the type of arg 5 for `select'. */
#undef SELECT_TYPE_ARG5
/* The size of a `curl_off_t', as computed by sizeof. */
#define SIZEOF_CURL_OFF_T 4
/* Define to 1 if you have the ANSI C header files. */
/* XXX: #undef STDC_HEADERS */
#define STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Define if you want to enable ares support */
#undef USE_ARES
/* Version number of package */
#undef VERSION
/* Define to 1 if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* type to use in place of in_addr_t if not defined */
#undef in_addr_t
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t
/* type to use in place of socklen_t if not defined */
#define socklen_t int
/* the signed version of size_t */
#undef ssize_t

View File

@ -55,6 +55,10 @@
#include <winsock2.h> #include <winsock2.h>
#endif #endif
#ifdef __NOVELL_LIBC__
#include <screen.h>
#endif
#ifdef TIME_WITH_SYS_TIME #ifdef TIME_WITH_SYS_TIME
/* We can include both fine */ /* We can include both fine */
#include <sys/time.h> #include <sys/time.h>
@ -379,8 +383,13 @@ static void help(void)
" -#/--progress-bar Display transfer progress as a progress bar", " -#/--progress-bar Display transfer progress as a progress bar",
NULL NULL
}; };
for(i=0; helptext[i]; i++) for(i=0; helptext[i]; i++) {
puts(helptext[i]); puts(helptext[i]);
#ifdef __NOVELL_LIBC__
if (i && ((i % 23) == 0))
pressanykey();
#endif
}
} }
struct LongShort { struct LongShort {
@ -3450,6 +3459,9 @@ int main(int argc, char *argv[])
res = operate(&config, argc, argv); res = operate(&config, argc, argv);
free_config_fields(&config); free_config_fields(&config);
#ifdef __NOVELL_LIBC__
pressanykey();
#endif
#ifdef VMS #ifdef VMS
if (res > CURL_LAST) res = CURL_LAST; /* If CURL_LAST exceeded then */ if (res > CURL_LAST) res = CURL_LAST; /* If CURL_LAST exceeded then */
return (vms_cond[res]|vms_show); /* curlmsg.h is out of sync. */ return (vms_cond[res]|vms_show); /* curlmsg.h is out of sync. */

View File

@ -41,6 +41,10 @@
/* include the hand-modified win32 adjusted config.h! */ /* include the hand-modified win32 adjusted config.h! */
#include "config-win32.h" #include "config-win32.h"
#endif #endif
#ifdef NETWARE
/* hand-modified NetWare config.h! */
#include "config-netware.h"
#endif
#ifdef macintosh #ifdef macintosh
/* this is not the same as Mac OS X */ /* this is not the same as Mac OS X */
#include "config-mac.h" #include "config-mac.h"