Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

strlcpy() and bsd/os


  • From: Bruce Momjian <bruce(at)momjian(dot)us>
  • To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
  • Subject: strlcpy() and bsd/os
  • Date: Sat, 30 Sep 2006 08:09:40 -0400 (EDT)
  • Message-id: <200609301209.k8UC9ek11915@momjian.us> <text/plain>

BSD/OS doesn't have a prototype for strlcpy() but has the function, so I
worked around that with a define;  patch attached and applied.

-- 
  Bruce Momjian   bruce(at)momjian(dot)us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: src/include/port.h
===================================================================
RCS file: /cvsroot/pgsql/src/include/port.h,v
retrieving revision 1.100
diff -c -c -r1.100 port.h
*** src/include/port.h	27 Sep 2006 16:29:46 -0000	1.100
--- src/include/port.h	30 Sep 2006 12:03:52 -0000
***************
*** 332,338 ****
  extern char *strdup(const char *str);
  #endif
  
! #ifndef HAVE_STRLCPY
  extern size_t strlcpy(char *dst, const char *src, size_t siz);
  #endif
  
--- 332,338 ----
  extern char *strdup(const char *str);
  #endif
  
! #if !defined(HAVE_STRLCPY) || defined(bsdi) /* bsdi doesn't have the prototype */
  extern size_t strlcpy(char *dst, const char *src, size_t siz);
  #endif
  


Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group