PageRenderTime 46ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

include/heimdal/roken.h

http://www.minix3.org/
C Header | 235 lines | 91 code | 106 blank | 38 comment | 0 complexity | a5ae813f46e89271706769f9bdffac6b MD5 | raw file
Possible License(s): MIT, WTFPL, AGPL-1.0, BSD-3-Clause, GPL-3.0, LGPL-2.0, JSON, 0BSD
  1. /* This is an OS dependent, generated file */
  2. #ifndef __ROKEN_H__
  3. #define __ROKEN_H__
  4. /* -*- C -*- */
  5. /*
  6. * Copyright (c) 1995-2005 Kungliga Tekniska Högskolan
  7. * (Royal Institute of Technology, Stockholm, Sweden).
  8. * All rights reserved.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. *
  14. * 1. Redistributions of source code must retain the above copyright
  15. * notice, this list of conditions and the following disclaimer.
  16. *
  17. * 2. Redistributions in binary form must reproduce the above copyright
  18. * notice, this list of conditions and the following disclaimer in the
  19. * documentation and/or other materials provided with the distribution.
  20. *
  21. * 3. Neither the name of the Institute nor the names of its contributors
  22. * may be used to endorse or promote products derived from this software
  23. * without specific prior written permission.
  24. *
  25. * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
  26. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  27. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  28. * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
  29. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  30. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  31. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  32. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  33. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  34. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  35. * SUCH DAMAGE.
  36. */
  37. /* $Id: roken.h,v 1.14 2010/01/25 00:26:04 christos Exp $ */
  38. #include <stdio.h>
  39. #include <stdlib.h>
  40. #include <stdarg.h>
  41. #include <stdint.h>
  42. #include <string.h>
  43. #include <signal.h>
  44. #include <sys/param.h>
  45. #include <inttypes.h>
  46. #include <sys/types.h>
  47. #include <unistd.h>
  48. #include <sys/socket.h>
  49. #include <sys/uio.h>
  50. #include <grp.h>
  51. #include <sys/stat.h>
  52. #include <netinet/in.h>
  53. #include <arpa/inet.h>
  54. #include <netdb.h>
  55. #include <arpa/nameser.h>
  56. #include <resolv.h>
  57. #include <syslog.h>
  58. #include <fcntl.h>
  59. #include <errno.h>
  60. #include <err.h>
  61. #include <termios.h>
  62. #include <sys/ioctl.h>
  63. #include <sys/time.h>
  64. #include <time.h>
  65. #include <strings.h>
  66. #include <paths.h>
  67. #include <roken-common.h>
  68. ROKEN_CPP_START
  69. #define rk_UNCONST(x) ((void *)(uintptr_t)(const void *)(x))
  70. char * ROKEN_LIB_FUNCTION strlwr(char *);
  71. size_t ROKEN_LIB_FUNCTION strnlen(const char*, size_t);
  72. ssize_t ROKEN_LIB_FUNCTION strsep_copy(const char**, const char*, char*, size_t);
  73. char * ROKEN_LIB_FUNCTION strupr(char *);
  74. #include <pwd.h>
  75. struct passwd * ROKEN_LIB_FUNCTION k_getpwnam (const char *);
  76. struct passwd * ROKEN_LIB_FUNCTION k_getpwuid (uid_t);
  77. const char * ROKEN_LIB_FUNCTION get_default_username (void);
  78. int ROKEN_LIB_FUNCTION mkstemp(char *);
  79. int ROKEN_LIB_FUNCTION daemon(int, int);
  80. time_t ROKEN_LIB_FUNCTION tm2time (struct tm, int);
  81. int ROKEN_LIB_FUNCTION unix_verify_user(char *, char *);
  82. int ROKEN_LIB_FUNCTION roken_concat (char *, size_t, ...);
  83. size_t ROKEN_LIB_FUNCTION roken_mconcat (char **, size_t, ...);
  84. int ROKEN_LIB_FUNCTION roken_vconcat (char *, size_t, va_list);
  85. size_t ROKEN_LIB_FUNCTION
  86. roken_vmconcat (char **, size_t, va_list);
  87. ssize_t ROKEN_LIB_FUNCTION net_write (int, const void *, size_t);
  88. ssize_t ROKEN_LIB_FUNCTION net_read (int, void *, size_t);
  89. int ROKEN_LIB_FUNCTION issuid(void);
  90. int ROKEN_LIB_FUNCTION get_window_size(int fd, int *, int *);
  91. extern char **environ;
  92. struct hostent * ROKEN_LIB_FUNCTION
  93. getipnodebyname (const char *, int, int, int *);
  94. struct hostent * ROKEN_LIB_FUNCTION
  95. getipnodebyaddr (const void *, size_t, int, int *);
  96. void ROKEN_LIB_FUNCTION
  97. freehostent (struct hostent *);
  98. struct hostent * ROKEN_LIB_FUNCTION
  99. copyhostent (const struct hostent *);
  100. int ROKEN_LIB_FUNCTION
  101. getnameinfo_verified(const struct sockaddr *, socklen_t,
  102. char *, size_t,
  103. char *, size_t,
  104. int);
  105. int ROKEN_LIB_FUNCTION
  106. roken_getaddrinfo_hostspec(const char *, int, struct addrinfo **);
  107. int ROKEN_LIB_FUNCTION
  108. roken_getaddrinfo_hostspec2(const char *, int, int, struct addrinfo **);
  109. void * ROKEN_LIB_FUNCTION emalloc (size_t);
  110. void * ROKEN_LIB_FUNCTION ecalloc(size_t, size_t);
  111. void * ROKEN_LIB_FUNCTION erealloc (void *, size_t);
  112. char * ROKEN_LIB_FUNCTION estrdup (const char *);
  113. /*
  114. * kludges and such
  115. */
  116. int ROKEN_LIB_FUNCTION
  117. roken_gethostby_setup(const char*, const char*);
  118. struct hostent* ROKEN_LIB_FUNCTION
  119. roken_gethostbyname(const char*);
  120. struct hostent* ROKEN_LIB_FUNCTION
  121. roken_gethostbyaddr(const void*, size_t, int);
  122. #define roken_getservbyname(x,y) getservbyname(x,y)
  123. #define roken_openlog(a,b,c) openlog(a,b,c)
  124. #define roken_getsockname(a,b,c) getsockname(a,b,c)
  125. void ROKEN_LIB_FUNCTION mini_inetd_addrinfo (struct addrinfo*);
  126. void ROKEN_LIB_FUNCTION mini_inetd (int);
  127. ROKEN_CPP_END
  128. #define ROKEN_VERSION 1.1
  129. #endif /* __ROKEN_H__ */