1*05b00f60SXin Li /* 2*05b00f60SXin Li * Copyright (c) 1983, 1993 The Regents of the University of California. 3*05b00f60SXin Li * Copyright (c) 1993 Digital Equipment Corporation. 4*05b00f60SXin Li * Copyright (c) 2012 G. Vanem <[email protected]>. 5*05b00f60SXin Li * Copyright (c) 2017 Ali Abdulkadir <[email protected]>. 6*05b00f60SXin Li * All rights reserved. 7*05b00f60SXin Li * 8*05b00f60SXin Li * Redistribution and use in source and binary forms, with or without 9*05b00f60SXin Li * modification, are permitted provided that the following conditions 10*05b00f60SXin Li * are met: 11*05b00f60SXin Li * 1. Redistributions of source code must retain the above copyright 12*05b00f60SXin Li * notice, this list of conditions and the following disclaimer. 13*05b00f60SXin Li * 2. Redistributions in binary form must reproduce the above copyright 14*05b00f60SXin Li * notice, this list of conditions and the following disclaimer in the 15*05b00f60SXin Li * documentation and/or other materials provided with the distribution. 16*05b00f60SXin Li * 3. All advertising materials mentioning features or use of this software 17*05b00f60SXin Li * must display the following acknowledgement: 18*05b00f60SXin Li * This product includes software developed by the University of 19*05b00f60SXin Li * California, Berkeley and its contributors. 20*05b00f60SXin Li * 4. Neither the name of the University nor the names of its contributors 21*05b00f60SXin Li * may be used to endorse or promote products derived from this software 22*05b00f60SXin Li * without specific prior written permission. 23*05b00f60SXin Li * 24*05b00f60SXin Li * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 25*05b00f60SXin Li * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26*05b00f60SXin Li * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27*05b00f60SXin Li * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28*05b00f60SXin Li * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29*05b00f60SXin Li * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30*05b00f60SXin Li * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31*05b00f60SXin Li * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32*05b00f60SXin Li * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33*05b00f60SXin Li * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34*05b00f60SXin Li * SUCH DAMAGE. 35*05b00f60SXin Li */ 36*05b00f60SXin Li 37*05b00f60SXin Li #ifndef ND_GETSERVENT_H 38*05b00f60SXin Li #define ND_GETSERVENT_H 39*05b00f60SXin Li 40*05b00f60SXin Li #ifdef _NETDB_H_ 41*05b00f60SXin Li /* Just in case... */ 42*05b00f60SXin Li #error netdb.h and getservent.h are incompatible 43*05b00f60SXin Li #else 44*05b00f60SXin Li #define _NETDB_H_ 45*05b00f60SXin Li #endif 46*05b00f60SXin Li 47*05b00f60SXin Li #ifdef _WIN32 48*05b00f60SXin Li #define __PATH_SYSROOT "SYSTEMROOT" 49*05b00f60SXin Li #define __PATH_ETC_INET "\\System32\\drivers\\etc\\" 50*05b00f60SXin Li #define __PATH_SERVICES "services" 51*05b00f60SXin Li #else 52*05b00f60SXin Li /* 53*05b00f60SXin Li * The idea here is to be able to replace "PREFIX" in __PATH_SYSROOT with a variable 54*05b00f60SXin Li * that could, for example, point to an alternative install location. 55*05b00f60SXin Li */ 56*05b00f60SXin Li #define __PATH_SYSROOT "PREFIX" 57*05b00f60SXin Li #define __PATH_ETC_INET "/etc/" 58*05b00f60SXin Li #define __PATH_SERVICES __PATH_ETC_INET"services" 59*05b00f60SXin Li #endif 60*05b00f60SXin Li 61*05b00f60SXin Li #define MAXALIASES 35 62*05b00f60SXin Li 63*05b00f60SXin Li void endservent (void); 64*05b00f60SXin Li struct servent *getservent(void); 65*05b00f60SXin Li void setservent (int f); 66*05b00f60SXin Li 67*05b00f60SXin Li #endif /* ! ND_GETSERVENT_H */ 68