From a4f36558fc1bb9c9f7f0b2f977a2e407905ccd88 Mon Sep 17 00:00:00 2001 From: Gunter Knauf Date: Wed, 11 Jul 2007 21:34:22 +0000 Subject: added NetWare-own file to provide some init functions (for now only CLIB); added call to netware_init() in curl_global_init() to make sure it gets called before any library functions get used. --- lib/nwos.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 lib/nwos.c (limited to 'lib/nwos.c') diff --git a/lib/nwos.c b/lib/nwos.c new file mode 100644 index 000000000..f1cf194df --- /dev/null +++ b/lib/nwos.c @@ -0,0 +1,84 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2007, Daniel Stenberg, , 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$ + ***************************************************************************/ + +#ifdef NETWARE /* Novell NetWare */ + +#include + +#ifdef __NOVELL_LIBC__ +/* For native LibC-based NLM we need to do nothing. */ +int netware_init ( void ) +{ + return 0; +} + +#else /* __NOVELL_LIBC__ */ + +/* For native CLib-based NLM we need to initialize the LONG namespace. */ +#include +#include +#include +#include +#include +/* Make the CLIB Ctx stuff link */ +#include +NETDB_DEFINE_CONTEXT + +int netware_init ( void ) +{ + int rc = 0; + /* import UnAugmentAsterisk dynamically for NW4.x compatibility */ + unsigned int myHandle = GetNLMHandle(); + void (*pUnAugmentAsterisk)(int) = (void(*)(int)) + ImportSymbol(myHandle, "UnAugmentAsterisk"); + if (pUnAugmentAsterisk) + pUnAugmentAsterisk(1); + UnimportSymbol(myHandle, "UnAugmentAsterisk"); + /* set long name space */ + if ((SetCurrentNameSpace(4) == 255)) { + rc = 1; + } + if ((SetTargetNameSpace(4) == 255)) { + rc = rc + 2; + } + UseAccurateCaseForPaths(1); + return rc; +} + +/* dummy function to satisfy newer prelude */ +int __init_environment ( void ) +{ + return 0; +} + +/* dummy function to satisfy newer prelude */ +int __deinit_environment ( void ) +{ + return 0; +} + +#endif /* __NOVELL_LIBC__ */ + +#endif /* NETWARE */ + + -- cgit v1.2.1 From 1866b95b7ff22cafff2f906199722b57f3617651 Mon Sep 17 00:00:00 2001 From: Gunter Knauf Date: Wed, 8 Aug 2007 20:09:08 +0000 Subject: moved ugly CLIB define to nwos.c. --- lib/nwos.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/nwos.c') diff --git a/lib/nwos.c b/lib/nwos.c index f1cf194df..22720a5b4 100644 --- a/lib/nwos.c +++ b/lib/nwos.c @@ -43,6 +43,9 @@ int netware_init ( void ) /* Make the CLIB Ctx stuff link */ #include NETDB_DEFINE_CONTEXT +/* Make the CLIB Inet stuff link */ +#include +NETINET_DEFINE_CONTEXT int netware_init ( void ) { -- cgit v1.2.1 From b238e0b1b4e8f3e5c4e9c0d7d8c565e3776b0999 Mon Sep 17 00:00:00 2001 From: Gunter Knauf Date: Thu, 9 Aug 2007 22:33:49 +0000 Subject: fixed warning with gcc 4.x (hopefully); dynamincally imported UseAccurateCaseForPaths() for CLIB port to be stonetime-compatible (NW 3.x). --- lib/nwos.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/nwos.c') diff --git a/lib/nwos.c b/lib/nwos.c index 22720a5b4..a84a3daf2 100644 --- a/lib/nwos.c +++ b/lib/nwos.c @@ -37,26 +37,32 @@ int netware_init ( void ) /* For native CLib-based NLM we need to initialize the LONG namespace. */ #include #include -#include #include #include /* Make the CLIB Ctx stuff link */ #include NETDB_DEFINE_CONTEXT /* Make the CLIB Inet stuff link */ +#include #include NETINET_DEFINE_CONTEXT int netware_init ( void ) { int rc = 0; - /* import UnAugmentAsterisk dynamically for NW4.x compatibility */ unsigned int myHandle = GetNLMHandle(); + /* import UnAugmentAsterisk dynamically for NW4.x compatibility */ void (*pUnAugmentAsterisk)(int) = (void(*)(int)) ImportSymbol(myHandle, "UnAugmentAsterisk"); + /* import UseAccurateCaseForPaths dynamically for NW3.x compatibility */ + void (*pUseAccurateCaseForPaths)(int) = (void(*)(int)) + ImportSymbol(myHandle, "UseAccurateCaseForPaths"); if (pUnAugmentAsterisk) pUnAugmentAsterisk(1); + if (pUseAccurateCaseForPaths) + pUseAccurateCaseForPaths(1); UnimportSymbol(myHandle, "UnAugmentAsterisk"); + UnimportSymbol(myHandle, "UseAccurateCaseForPaths"); /* set long name space */ if ((SetCurrentNameSpace(4) == 255)) { rc = 1; @@ -64,7 +70,6 @@ int netware_init ( void ) if ((SetTargetNameSpace(4) == 255)) { rc = rc + 2; } - UseAccurateCaseForPaths(1); return rc; } -- cgit v1.2.1 From cbd1a77ec24e397d05f20c6de106625676343c9d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 7 Nov 2007 09:21:35 +0000 Subject: if () => if() while () => while() and some other minor re-indentings --- lib/nwos.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/nwos.c') diff --git a/lib/nwos.c b/lib/nwos.c index a84a3daf2..d9bfcf15e 100644 --- a/lib/nwos.c +++ b/lib/nwos.c @@ -57,17 +57,17 @@ int netware_init ( void ) /* import UseAccurateCaseForPaths dynamically for NW3.x compatibility */ void (*pUseAccurateCaseForPaths)(int) = (void(*)(int)) ImportSymbol(myHandle, "UseAccurateCaseForPaths"); - if (pUnAugmentAsterisk) + if(pUnAugmentAsterisk) pUnAugmentAsterisk(1); - if (pUseAccurateCaseForPaths) + if(pUseAccurateCaseForPaths) pUseAccurateCaseForPaths(1); UnimportSymbol(myHandle, "UnAugmentAsterisk"); UnimportSymbol(myHandle, "UseAccurateCaseForPaths"); /* set long name space */ - if ((SetCurrentNameSpace(4) == 255)) { + if((SetCurrentNameSpace(4) == 255)) { rc = 1; } - if ((SetTargetNameSpace(4) == 255)) { + if((SetTargetNameSpace(4) == 255)) { rc = rc + 2; } return rc; -- cgit v1.2.1 From b2f430898053258622eebee3328f03441367a32c Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 27 Oct 2009 16:38:42 +0000 Subject: Fix Pelles C Win32 target compilation issues --- lib/nwos.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/nwos.c') diff --git a/lib/nwos.c b/lib/nwos.c index d9bfcf15e..399580c82 100644 --- a/lib/nwos.c +++ b/lib/nwos.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2007, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -87,6 +87,10 @@ int __deinit_environment ( void ) #endif /* __NOVELL_LIBC__ */ -#endif /* NETWARE */ +#else /* NETWARE */ +#ifdef __POCC__ +# pragma warn(disable:2024) /* Disable warning #2024: Empty input file */ +#endif +#endif /* NETWARE */ -- cgit v1.2.1 From 2309b4e330b96bc2e1f8e36b6184015e59544037 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 24 Mar 2010 11:02:54 +0100 Subject: remove the CVSish $Id$ lines --- lib/nwos.c | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/nwos.c') diff --git a/lib/nwos.c b/lib/nwos.c index 399580c82..ac365124f 100644 --- a/lib/nwos.c +++ b/lib/nwos.c @@ -18,7 +18,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ #ifdef NETWARE /* Novell NetWare */ -- cgit v1.2.1 From f1586cb4775681810afd8e6626e7842d459f3b85 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 26 Jul 2011 17:23:27 +0200 Subject: stdio.h, stdlib.h, string.h, stdarg.h and ctype.h inclusion done in setup_once.h --- lib/nwos.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'lib/nwos.c') diff --git a/lib/nwos.c b/lib/nwos.c index ac365124f..bd695b3f9 100644 --- a/lib/nwos.c +++ b/lib/nwos.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -20,9 +20,9 @@ * ***************************************************************************/ -#ifdef NETWARE /* Novell NetWare */ +#include "setup.h" -#include +#ifdef NETWARE /* Novell NetWare */ #ifdef __NOVELL_LIBC__ /* For native LibC-based NLM we need to do nothing. */ @@ -34,7 +34,6 @@ int netware_init ( void ) #else /* __NOVELL_LIBC__ */ /* For native CLib-based NLM we need to initialize the LONG namespace. */ -#include #include #include #include @@ -86,10 +85,4 @@ int __deinit_environment ( void ) #endif /* __NOVELL_LIBC__ */ -#else /* NETWARE */ - -#ifdef __POCC__ -# pragma warn(disable:2024) /* Disable warning #2024: Empty input file */ -#endif - #endif /* NETWARE */ -- cgit v1.2.1 From 8a2be299f4c91a87014b35bcf6b75f91ab477262 Mon Sep 17 00:00:00 2001 From: Marc Hoersken Date: Fri, 14 Sep 2012 00:44:16 +0200 Subject: checksrc: Fixed line length and comment indentation --- lib/nwos.c | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'lib/nwos.c') diff --git a/lib/nwos.c b/lib/nwos.c index bd695b3f9..dd3291155 100644 --- a/lib/nwos.c +++ b/lib/nwos.c @@ -28,7 +28,7 @@ /* For native LibC-based NLM we need to do nothing. */ int netware_init ( void ) { - return 0; + return 0; } #else /* __NOVELL_LIBC__ */ @@ -47,40 +47,40 @@ NETINET_DEFINE_CONTEXT int netware_init ( void ) { - int rc = 0; - unsigned int myHandle = GetNLMHandle(); - /* import UnAugmentAsterisk dynamically for NW4.x compatibility */ - void (*pUnAugmentAsterisk)(int) = (void(*)(int)) - ImportSymbol(myHandle, "UnAugmentAsterisk"); - /* import UseAccurateCaseForPaths dynamically for NW3.x compatibility */ - void (*pUseAccurateCaseForPaths)(int) = (void(*)(int)) - ImportSymbol(myHandle, "UseAccurateCaseForPaths"); - if(pUnAugmentAsterisk) - pUnAugmentAsterisk(1); - if(pUseAccurateCaseForPaths) - pUseAccurateCaseForPaths(1); - UnimportSymbol(myHandle, "UnAugmentAsterisk"); - UnimportSymbol(myHandle, "UseAccurateCaseForPaths"); - /* set long name space */ - if((SetCurrentNameSpace(4) == 255)) { - rc = 1; - } - if((SetTargetNameSpace(4) == 255)) { - rc = rc + 2; - } - return rc; + int rc = 0; + unsigned int myHandle = GetNLMHandle(); + /* import UnAugmentAsterisk dynamically for NW4.x compatibility */ + void (*pUnAugmentAsterisk)(int) = (void(*)(int)) + ImportSymbol(myHandle, "UnAugmentAsterisk"); + /* import UseAccurateCaseForPaths dynamically for NW3.x compatibility */ + void (*pUseAccurateCaseForPaths)(int) = (void(*)(int)) + ImportSymbol(myHandle, "UseAccurateCaseForPaths"); + if(pUnAugmentAsterisk) + pUnAugmentAsterisk(1); + if(pUseAccurateCaseForPaths) + pUseAccurateCaseForPaths(1); + UnimportSymbol(myHandle, "UnAugmentAsterisk"); + UnimportSymbol(myHandle, "UseAccurateCaseForPaths"); + /* set long name space */ + if((SetCurrentNameSpace(4) == 255)) { + rc = 1; + } + if((SetTargetNameSpace(4) == 255)) { + rc = rc + 2; + } + return rc; } /* dummy function to satisfy newer prelude */ int __init_environment ( void ) { - return 0; + return 0; } /* dummy function to satisfy newer prelude */ int __deinit_environment ( void ) { - return 0; + return 0; } #endif /* __NOVELL_LIBC__ */ -- cgit v1.2.1