Ticket #42531: patch-src-strlcpyu.h.diff

File patch-src-strlcpyu.h.diff, 748 bytes (added by jul_bsd@…, 10 years ago)
  • src/strlcpyu.h

    old new  
    2121#ifndef __STRLCPY_H__
    2222#define __STRLCPY_H__
    2323
     24#ifndef strlcpy
     25/*
     26 * On OS X (and probably some other systems aswell), strlcpy might be
     27 * implemented as a macro. If this macro is defined while we're including this
     28 * header, strlcpy is already declared and trying to re-declare it with the
     29 * following line *will* fail, because the macro will expand to something
     30 * that's not a valid function name.
     31 */
    2432size_t strlcpy(char *, const char *, size_t);
     33#endif /* !defined(strlcpy) */
    2534
    2635#endif /* __STRLCPY_H__ */