aliases.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* Copyright (C) 1996-2016 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. License along with the GNU C Library; if not, see
  13. <http://www.gnu.org/licenses/>. */
  14. #ifndef _ALIASES_H
  15. #define _ALIASES_H 1
  16. #include <features.h>
  17. #include <sys/types.h>
  18. __BEGIN_DECLS
  19. /* Structure to represent one entry of the alias data base. */
  20. struct aliasent
  21. {
  22. char *alias_name;
  23. size_t alias_members_len;
  24. char **alias_members;
  25. int alias_local;
  26. };
  27. /* Open alias data base files. */
  28. extern void setaliasent (void) __THROW;
  29. /* Close alias data base files. */
  30. extern void endaliasent (void) __THROW;
  31. /* Get the next entry from the alias data base. */
  32. extern struct aliasent *getaliasent (void) __THROW;
  33. /* Get the next entry from the alias data base and put it in RESULT_BUF. */
  34. extern int getaliasent_r (struct aliasent *__restrict __result_buf,
  35. char *__restrict __buffer, size_t __buflen,
  36. struct aliasent **__restrict __result) __THROW;
  37. /* Get alias entry corresponding to NAME. */
  38. extern struct aliasent *getaliasbyname (const char *__name) __THROW;
  39. /* Get alias entry corresponding to NAME and put it in RESULT_BUF. */
  40. extern int getaliasbyname_r (const char *__restrict __name,
  41. struct aliasent *__restrict __result_buf,
  42. char *__restrict __buffer, size_t __buflen,
  43. struct aliasent **__restrict __result) __THROW;
  44. __END_DECLS
  45. #endif /* aliases.h */