lt__strl.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* lt__strl.h -- size-bounded string copying and concatenation
  2. Copyright (C) 2004, 2006, 2011-2015 Free Software Foundation, Inc.
  3. Written by Bob Friesenhahn, 2004
  4. NOTE: The canonical source of this file is maintained with the
  5. GNU Libtool package. Report bugs to bug-libtool@gnu.org.
  6. GNU Libltdl is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU Lesser General Public
  8. License as published by the Free Software Foundation; either
  9. version 2 of the License, or (at your option) any later version.
  10. As a special exception to the GNU Lesser General Public License,
  11. if you distribute this file as part of a program or library that
  12. is built using GNU Libtool, you may include this file under the
  13. same distribution terms that you use for the rest of that program.
  14. GNU Libltdl is distributed in the hope that it will be useful,
  15. but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. GNU Lesser General Public License for more details.
  18. You should have received a copy of the GNU Lesser General Public
  19. License along with GNU Libltdl; see the file COPYING.LIB. If not, a
  20. copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
  21. or obtained by writing to the Free Software Foundation, Inc.,
  22. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  23. */
  24. #if !defined LT__STRL_H
  25. #define LT__STRL_H 1
  26. #if defined LT_CONFIG_H
  27. # include LT_CONFIG_H
  28. #else
  29. # include <config.h>
  30. #endif
  31. #include <string.h>
  32. #include "lt_system.h"
  33. #if !defined HAVE_STRLCAT
  34. # define strlcat(dst,src,dstsize) lt_strlcat(dst,src,dstsize)
  35. LT_SCOPE size_t lt_strlcat(char *dst, const char *src, const size_t dstsize);
  36. #endif /* !defined HAVE_STRLCAT */
  37. #if !defined HAVE_STRLCPY
  38. # define strlcpy(dst,src,dstsize) lt_strlcpy(dst,src,dstsize)
  39. LT_SCOPE size_t lt_strlcpy(char *dst, const char *src, const size_t dstsize);
  40. #endif /* !defined HAVE_STRLCPY */
  41. #endif /*!defined LT__STRL_H*/