1 /***************************************************************************
3 * Project ___| | | | _ \| |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
8 * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
10 * This software is licensed as described in the file COPYING, which
11 * you should have received as part of this distribution. The terms
12 * are also available at https://curl.haxx.se/docs/copyright.html.
14 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 * copies of the Software, and permit persons to whom the Software is
16 * furnished to do so, under the terms of the COPYING file.
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
21 ***************************************************************************/
23 #include "curl_setup.h"
25 #ifdef NETWARE /* Novell NetWare */
27 #ifdef __NOVELL_LIBC__
28 /* For native LibC-based NLM we need to do nothing. */
29 int netware_init(void)
34 #else /* __NOVELL_LIBC__ */
36 /* For native CLib-based NLM we need to initialize the LONG namespace. */
40 /* Make the CLIB Ctx stuff link */
43 /* Make the CLIB Inet stuff link */
44 #include <netinet/in.h>
45 #include <arpa/inet.h>
46 NETINET_DEFINE_CONTEXT
48 int netware_init(void)
51 unsigned int myHandle = GetNLMHandle();
52 /* import UnAugmentAsterisk dynamically for NW4.x compatibility */
53 void (*pUnAugmentAsterisk)(int) = (void(*)(int))
54 ImportSymbol(myHandle, "UnAugmentAsterisk");
55 /* import UseAccurateCaseForPaths dynamically for NW3.x compatibility */
56 void (*pUseAccurateCaseForPaths)(int) = (void(*)(int))
57 ImportSymbol(myHandle, "UseAccurateCaseForPaths");
58 if(pUnAugmentAsterisk)
59 pUnAugmentAsterisk(1);
60 if(pUseAccurateCaseForPaths)
61 pUseAccurateCaseForPaths(1);
62 UnimportSymbol(myHandle, "UnAugmentAsterisk");
63 UnimportSymbol(myHandle, "UseAccurateCaseForPaths");
64 /* set long name space */
65 if((SetCurrentNameSpace(4) == 255)) {
68 if((SetTargetNameSpace(4) == 255)) {
74 /* dummy function to satisfy newer prelude */
75 int __init_environment(void)
80 /* dummy function to satisfy newer prelude */
81 int __deinit_environment(void)
86 #endif /* __NOVELL_LIBC__ */