getsrvbynm_r.c 1.0 KB

1234567891011121314151617181920212223242526272829
  1. /* Copyright (C) 1996-2026 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published
  5. by the Free Software Foundation; version 2 of the License, or
  6. (at your option) any later version.
  7. This program 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
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, see <https://www.gnu.org/licenses/>. */
  13. #include <netdb.h>
  14. #define LOOKUP_TYPE struct servent
  15. #define FUNCTION_NAME getservbyname
  16. #define DATABASE_NAME services
  17. #define ADD_PARAMS const char *name, const char *proto
  18. #define ADD_VARIABLES name, proto
  19. /* We are nscd, so we don't want to be talking to ourselves. */
  20. #undef USE_NSCD
  21. #include "../nss/getXXbyYY_r.c"