nwos.c
Go to the documentation of this file.
00001 /***************************************************************************
00002  *                                  _   _ ____  _
00003  *  Project                     ___| | | |  _ \| |
00004  *                             / __| | | | |_) | |
00005  *                            | (__| |_| |  _ <| |___
00006  *                             \___|\___/|_| \_\_____|
00007  *
00008  * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
00009  *
00010  * This software is licensed as described in the file COPYING, which
00011  * you should have received as part of this distribution. The terms
00012  * are also available at https://curl.haxx.se/docs/copyright.html.
00013  *
00014  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
00015  * copies of the Software, and permit persons to whom the Software is
00016  * furnished to do so, under the terms of the COPYING file.
00017  *
00018  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
00019  * KIND, either express or implied.
00020  *
00021  ***************************************************************************/
00022 
00023 #include "curl_setup.h"
00024 
00025 #ifdef NETWARE /* Novell NetWare */
00026 
00027 #ifdef __NOVELL_LIBC__
00028 /* For native LibC-based NLM we need to do nothing. */
00029 int netware_init(void)
00030 {
00031   return 0;
00032 }
00033 
00034 #else /* __NOVELL_LIBC__ */
00035 
00036 /* For native CLib-based NLM we need to initialize the LONG namespace. */
00037 #include <nwnspace.h>
00038 #include <nwthread.h>
00039 #include <nwadv.h>
00040 /* Make the CLIB Ctx stuff link */
00041 #include <netdb.h>
00042 NETDB_DEFINE_CONTEXT
00043 /* Make the CLIB Inet stuff link */
00044 #include <netinet/in.h>
00045 #include <arpa/inet.h>
00046 NETINET_DEFINE_CONTEXT
00047 
00048 int netware_init(void)
00049 {
00050   int rc = 0;
00051   unsigned int myHandle = GetNLMHandle();
00052   /* import UnAugmentAsterisk dynamically for NW4.x compatibility */
00053   void (*pUnAugmentAsterisk)(int) = (void(*)(int))
00054           ImportSymbol(myHandle, "UnAugmentAsterisk");
00055   /* import UseAccurateCaseForPaths dynamically for NW3.x compatibility */
00056   void (*pUseAccurateCaseForPaths)(int) = (void(*)(int))
00057           ImportSymbol(myHandle, "UseAccurateCaseForPaths");
00058   if(pUnAugmentAsterisk)
00059     pUnAugmentAsterisk(1);
00060   if(pUseAccurateCaseForPaths)
00061     pUseAccurateCaseForPaths(1);
00062   UnimportSymbol(myHandle, "UnAugmentAsterisk");
00063   UnimportSymbol(myHandle, "UseAccurateCaseForPaths");
00064   /* set long name space */
00065   if((SetCurrentNameSpace(4) == 255)) {
00066     rc = 1;
00067   }
00068   if((SetTargetNameSpace(4) == 255)) {
00069     rc = rc + 2;
00070   }
00071   return rc;
00072 }
00073 
00074 /* dummy function to satisfy newer prelude */
00075 int __init_environment(void)
00076 {
00077   return 0;
00078 }
00079 
00080 /* dummy function to satisfy newer prelude */
00081 int __deinit_environment(void)
00082 {
00083   return 0;
00084 }
00085 
00086 #endif /* __NOVELL_LIBC__ */
00087 
00088 #endif /* NETWARE */


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:05