summaryrefslogtreecommitdiff
path: root/glibc-compat/include
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-09-22 21:21:10 +0000
committerRoland McGrath <roland@gnu.org>2004-09-22 21:21:10 +0000
commitb5707b44d25d7af61b0338c2a2206c036eaf7337 (patch)
treed8b9e865cbc78d64835a63959370865a2a043223 /glibc-compat/include
parent4ff389feb39f2eb649530b843d478c80c27ab4cf (diff)
Changes and additions migrated from cvs.devel.redhat.com:/cvs/devel/glibc to fedora-branch
Diffstat (limited to 'glibc-compat/include')
-rw-r--r--glibc-compat/include/aliases.h20
-rw-r--r--glibc-compat/include/grp.h29
-rw-r--r--glibc-compat/include/netdb.h178
-rw-r--r--glibc-compat/include/pwd.h25
-rw-r--r--glibc-compat/include/rpc/netdb.h24
-rw-r--r--glibc-compat/include/shadow.h24
6 files changed, 300 insertions, 0 deletions
diff --git a/glibc-compat/include/aliases.h b/glibc-compat/include/aliases.h
new file mode 100644
index 0000000000..3932e52097
--- /dev/null
+++ b/glibc-compat/include/aliases.h
@@ -0,0 +1,20 @@
+#ifndef _ALIASES_H
+#include <inet/aliases.h>
+
+extern int __getaliasent_r (struct aliasent *__restrict __result_buf,
+ char *__restrict __buffer, size_t __buflen,
+ struct aliasent **__restrict __result);
+extern int __old_getaliasent_r (struct aliasent *__restrict __result_buf,
+ char *__restrict __buffer, size_t __buflen,
+ struct aliasent **__restrict __result);
+
+extern int __getaliasbyname_r (__const char *__restrict __name,
+ struct aliasent *__restrict __result_buf,
+ char *__restrict __buffer, size_t __buflen,
+ struct aliasent **__restrict __result);
+extern int __old_getaliasbyname_r (__const char *__restrict __name,
+ struct aliasent *__restrict __result_buf,
+ char *__restrict __buffer, size_t __buflen,
+ struct aliasent **__restrict __result);
+
+#endif
diff --git a/glibc-compat/include/grp.h b/glibc-compat/include/grp.h
new file mode 100644
index 0000000000..aba77c6e8c
--- /dev/null
+++ b/glibc-compat/include/grp.h
@@ -0,0 +1,29 @@
+#ifndef _GRP_H
+#include <grp/grp.h>
+
+/* Now define the internal interfaces. */
+extern int __getgrent_r (struct group *__resultbuf, char *buffer,
+ size_t __buflen, struct group **__result);
+extern int __old_getgrent_r (struct group *__resultbuf, char *buffer,
+ size_t __buflen, struct group **__result);
+extern int __fgetgrent_r (FILE * __stream, struct group *__resultbuf,
+ char *buffer, size_t __buflen,
+ struct group **__result);
+
+/* Search for an entry with a matching group ID. */
+extern int __getgrgid_r (__gid_t __gid, struct group *__resultbuf,
+ char *__buffer, size_t __buflen,
+ struct group **__result);
+extern int __old_getgrgid_r (__gid_t __gid, struct group *__resultbuf,
+ char *__buffer, size_t __buflen,
+ struct group **__result);
+
+/* Search for an entry with a matching group name. */
+extern int __getgrnam_r (__const char *__name, struct group *__resultbuf,
+ char *__buffer, size_t __buflen,
+ struct group **__result);
+extern int __old_getgrnam_r (__const char *__name, struct group *__resultbuf,
+ char *__buffer, size_t __buflen,
+ struct group **__result);
+
+#endif
diff --git a/glibc-compat/include/netdb.h b/glibc-compat/include/netdb.h
new file mode 100644
index 0000000000..85ab234177
--- /dev/null
+++ b/glibc-compat/include/netdb.h
@@ -0,0 +1,178 @@
+#ifndef _NETDB_H
+#include <glibc-compat/include/rpc/netdb.h>
+#include <resolv/netdb.h>
+
+/* Macros for accessing h_errno from inside libc. */
+# ifdef _LIBC_REENTRANT
+# include <tls.h>
+# if USE___THREAD
+# undef h_errno
+# ifndef NOT_IN_libc
+# define h_errno __libc_h_errno
+# else
+# define h_errno h_errno /* For #ifndef h_errno tests. */
+# endif
+extern __thread int h_errno attribute_tls_model_ie;
+# define __set_h_errno(x) (h_errno = (x))
+# else
+static inline int
+__set_h_errno (int __err)
+{
+ return *__h_errno_location () = __err;
+}
+# endif
+# else
+# undef h_errno
+# define __set_h_errno(x) (h_errno = (x))
+extern int h_errno;
+# endif /* _LIBC_REENTRANT */
+
+/* Document internal interfaces. */
+extern int __gethostent_r (struct hostent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct hostent **__restrict __result,
+ int *__restrict __h_errnop);
+extern int __old_gethostent_r (struct hostent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct hostent **__restrict __result,
+ int *__restrict __h_errnop);
+
+extern int __gethostbyaddr_r (__const void *__restrict __addr,
+ socklen_t __len, int __type,
+ struct hostent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct hostent **__restrict __result,
+ int *__restrict __h_errnop);
+extern int __old_gethostbyaddr_r (__const void *__restrict __addr,
+ socklen_t __len, int __type,
+ struct hostent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct hostent **__restrict __result,
+ int *__restrict __h_errnop);
+
+extern int __gethostbyname_r (__const char *__restrict __name,
+ struct hostent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct hostent **__restrict __result,
+ int *__restrict __h_errnop);
+extern int __old_gethostbyname_r (__const char *__restrict __name,
+ struct hostent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct hostent **__restrict __result,
+ int *__restrict __h_errnop);
+
+extern int __gethostbyname2_r (__const char *__restrict __name, int __af,
+ struct hostent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct hostent **__restrict __result,
+ int *__restrict __h_errnop);
+extern int __old_gethostbyname2_r (__const char *__restrict __name, int __af,
+ struct hostent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct hostent **__restrict __result,
+ int *__restrict __h_errnop);
+
+extern int __getnetent_r (struct netent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct netent **__restrict __result,
+ int *__restrict __h_errnop);
+extern int __old_getnetent_r (struct netent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct netent **__restrict __result,
+ int *__restrict __h_errnop);
+
+extern int __getnetbyaddr_r (uint32_t __net, int __type,
+ struct netent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct netent **__restrict __result,
+ int *__restrict __h_errnop);
+extern int __old_getnetbyaddr_r (uint32_t __net, int __type,
+ struct netent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct netent **__restrict __result,
+ int *__restrict __h_errnop);
+
+extern int __getnetbyname_r (__const char *__restrict __name,
+ struct netent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct netent **__restrict __result,
+ int *__restrict __h_errnop);
+extern int __old_getnetbyname_r (__const char *__restrict __name,
+ struct netent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct netent **__restrict __result,
+ int *__restrict __h_errnop);
+
+extern int __getservent_r (struct servent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct servent **__restrict __result);
+extern int __old_getservent_r (struct servent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct servent **__restrict __result);
+
+extern int __getservbyname_r (__const char *__restrict __name,
+ __const char *__restrict __proto,
+ struct servent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct servent **__restrict __result);
+extern int __old_getservbyname_r (__const char *__restrict __name,
+ __const char *__restrict __proto,
+ struct servent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct servent **__restrict __result);
+
+extern int __getservbyport_r (int __port,
+ __const char *__restrict __proto,
+ struct servent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct servent **__restrict __result);
+extern int __old_getservbyport_r (int __port,
+ __const char *__restrict __proto,
+ struct servent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct servent **__restrict __result);
+
+extern int __getprotoent_r (struct protoent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct protoent **__restrict __result);
+extern int __old_getprotoent_r (struct protoent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct protoent **__restrict __result);
+
+extern int __getprotobyname_r (__const char *__restrict __name,
+ struct protoent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct protoent **__restrict __result);
+extern int __old_getprotobyname_r (__const char *__restrict __name,
+ struct protoent *__restrict __result_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct protoent **__restrict __result);
+
+extern int __getprotobynumber_r (int __proto,
+ struct protoent *__restrict __res_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct protoent **__restrict __result);
+extern int __old_getprotobynumber_r (int __proto,
+ struct protoent *__restrict __res_buf,
+ char *__restrict __buf, size_t __buflen,
+ struct protoent **__restrict __result);
+
+extern int __getnetgrent_r (char **__restrict __hostp,
+ char **__restrict __userp,
+ char **__restrict __domainp,
+ char *__restrict __buffer, size_t __buflen);
+
+extern int ruserpass (const char *host, const char **aname,
+ const char **apass);
+
+
+/* The following declarations and definitions have been removed from
+ the public header since we don't want people to use them. */
+
+#define AI_V4MAPPED 0x0008 /* IPv4-mapped addresses are acceptable. */
+#define AI_ALL 0x0010 /* Return both IPv4 and IPv6 addresses. */
+#define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose
+ returned address type. */
+#define AI_DEFAULT (AI_V4MAPPED | AI_ADDRCONFIG)
+
+#endif /* !_NETDB_H */
diff --git a/glibc-compat/include/pwd.h b/glibc-compat/include/pwd.h
new file mode 100644
index 0000000000..a0e94e6631
--- /dev/null
+++ b/glibc-compat/include/pwd.h
@@ -0,0 +1,25 @@
+#ifndef _PWD_H
+#include <pwd/pwd.h>
+
+/* Now define the internal interfaces. */
+extern int __getpwent_r (struct passwd *__resultbuf, char *__buffer,
+ size_t __buflen, struct passwd **__result);
+extern int __old_getpwent_r (struct passwd *__resultbuf, char *__buffer,
+ size_t __buflen, struct passwd **__result);
+extern int __getpwuid_r (__uid_t __uid, struct passwd *__resultbuf,
+ char *__buffer, size_t __buflen,
+ struct passwd **__result);
+extern int __old_getpwuid_r (__uid_t __uid, struct passwd *__resultbuf,
+ char *__buffer, size_t __buflen,
+ struct passwd **__result);
+extern int __getpwnam_r (__const char *__name, struct passwd *__resultbuf,
+ char *__buffer, size_t __buflen,
+ struct passwd **__result);
+extern int __old_getpwnam_r (__const char *__name, struct passwd *__resultbuf,
+ char *__buffer, size_t __buflen,
+ struct passwd **__result);
+extern int __fgetpwent_r (FILE * __stream, struct passwd *__resultbuf,
+ char *__buffer, size_t __buflen,
+ struct passwd **__result);
+
+#endif
diff --git a/glibc-compat/include/rpc/netdb.h b/glibc-compat/include/rpc/netdb.h
new file mode 100644
index 0000000000..54a4b70052
--- /dev/null
+++ b/glibc-compat/include/rpc/netdb.h
@@ -0,0 +1,24 @@
+#ifndef _RPC_NETDB_H
+#include <sunrpc/rpc/netdb.h>
+
+extern int __getrpcbyname_r (__const char *__name, struct rpcent *__result_buf,
+ char *__buffer, size_t __buflen,
+ struct rpcent **__result);
+extern int __old_getrpcbyname_r (__const char *__name,
+ struct rpcent *__result_buf,
+ char *__buffer, size_t __buflen,
+ struct rpcent **__result);
+
+extern int __getrpcbynumber_r (int __number, struct rpcent *__result_buf,
+ char *__buffer, size_t __buflen,
+ struct rpcent **__result);
+extern int __old_getrpcbynumber_r (int __number, struct rpcent *__result_buf,
+ char *__buffer, size_t __buflen,
+ struct rpcent **__result);
+
+extern int __getrpcent_r (struct rpcent *__result_buf, char *__buffer,
+ size_t __buflen, struct rpcent **__result);
+extern int __old_getrpcent_r (struct rpcent *__result_buf, char *__buffer,
+ size_t __buflen, struct rpcent **__result);
+
+#endif
diff --git a/glibc-compat/include/shadow.h b/glibc-compat/include/shadow.h
new file mode 100644
index 0000000000..e9429d7369
--- /dev/null
+++ b/glibc-compat/include/shadow.h
@@ -0,0 +1,24 @@
+#ifndef _SHADOW_H
+#include <shadow/shadow.h>
+
+/* Now define the internal interfaces. */
+extern int __getspent_r (struct spwd *__result_buf, char *__buffer,
+ size_t __buflen, struct spwd **__result);
+extern int __old_getspent_r (struct spwd *__result_buf, char *__buffer,
+ size_t __buflen, struct spwd **__result);
+extern int __getspnam_r (__const char *__name, struct spwd *__result_buf,
+ char *__buffer, size_t __buflen,
+ struct spwd **__result);
+extern int __old_getspnam_r (__const char *__name, struct spwd *__result_buf,
+ char *__buffer, size_t __buflen,
+ struct spwd **__result);
+extern int __sgetspent_r (__const char *__string,
+ struct spwd *__result_buf, char *__buffer,
+ size_t __buflen, struct spwd **__result);
+extern int __fgetspent_r (FILE *__stream, struct spwd *__result_buf,
+ char *__buffer, size_t __buflen,
+ struct spwd **__result);
+extern int __lckpwdf (void);
+extern int __ulckpwdf (void);
+
+#endif