1 /***************************************************************************
3 * Project ___| | | | _ \| |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
8 * Copyright (C) 1998 - 2007, 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 http://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 * $Id: nwos.c,v 1.1.1.1 2008-09-23 16:32:05 hoffman Exp $
22 ***************************************************************************/
24 #ifdef NETWARE /* Novell NetWare */
28 #ifdef __NOVELL_LIBC__
29 /* For native LibC-based NLM we need to do nothing. */
30 int netware_init ( void )
35 #else /* __NOVELL_LIBC__ */
37 /* For native CLib-based NLM we need to initialize the LONG namespace. */
42 /* Make the CLIB Ctx stuff link */
45 /* Make the CLIB Inet stuff link */
46 #include <netinet/in.h>
47 #include <arpa/inet.h>
48 NETINET_DEFINE_CONTEXT
50 int netware_init ( void )
53 unsigned int myHandle
= GetNLMHandle();
54 /* import UnAugmentAsterisk dynamically for NW4.x compatibility */
55 void (*pUnAugmentAsterisk
)(int) = (void(*)(int))
56 ImportSymbol(myHandle
, "UnAugmentAsterisk");
57 /* import UseAccurateCaseForPaths dynamically for NW3.x compatibility */
58 void (*pUseAccurateCaseForPaths
)(int) = (void(*)(int))
59 ImportSymbol(myHandle
, "UseAccurateCaseForPaths");
60 if(pUnAugmentAsterisk
)
61 pUnAugmentAsterisk(1);
62 if(pUseAccurateCaseForPaths
)
63 pUseAccurateCaseForPaths(1);
64 UnimportSymbol(myHandle
, "UnAugmentAsterisk");
65 UnimportSymbol(myHandle
, "UseAccurateCaseForPaths");
66 /* set long name space */
67 if((SetCurrentNameSpace(4) == 255)) {
70 if((SetTargetNameSpace(4) == 255)) {
76 /* dummy function to satisfy newer prelude */
77 int __init_environment ( void )
82 /* dummy function to satisfy newer prelude */
83 int __deinit_environment ( void )
88 #endif /* __NOVELL_LIBC__ */