Subversion Repositories f9daq

Rev

Rev 197 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. /********************************************************************\
  2.  
  3.    Name:         strlcpy.h
  4.    Created by:   Stefan Ritt
  5.    Copyright 2000 + Stefan Ritt
  6.  
  7.    Contents:     Header file for strlcpy.c
  8.    
  9.    This file is part of MIDAS XML Library.
  10.  
  11.    MIDAS XML Library is free software: you can redistribute it and/or modify
  12.    it under the terms of the GNU General Public License as published by
  13.    the Free Software Foundation, either version 3 of the License, or
  14.    (at your option) any later version.
  15.  
  16.    MIDAS XML Library is distributed in the hope that it will be useful,
  17.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  18.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19.    GNU General Public License for more details.
  20.  
  21.    You should have received a copy of the GNU General Public License
  22.    along with MIDAS XML Library.  If not, see <http://www.gnu.org/licenses/>.
  23.  
  24. \********************************************************************/
  25.  
  26. #ifndef _STRLCPY_H_
  27. #define _STRLCPY_H_
  28.  
  29. // some version of gcc have a built-in strlcpy
  30. #ifdef strlcpy
  31. #define STRLCPY_DEFINED
  32. #endif
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. #ifndef EXPRT
  39. #if defined(EXPORT_DLL)
  40. #define EXPRT __declspec(dllexport)
  41. #else
  42. #define EXPRT
  43. #endif
  44. #endif
  45.  
  46. #ifndef STRLCPY_DEFINED
  47. size_t EXPRT strlcpy(char *dst, const char *src, size_t size);
  48. size_t EXPRT strlcat(char *dst, const char *src, size_t size);
  49. #endif
  50.  
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54.  
  55. #endif /*_STRLCPY_H_ */
  56.