a replacement for strlcpy

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nano2
    New Member
    • Jan 2007
    • 41

    a replacement for strlcpy

    Hi all,

    I have the following scenario but strlcpy is not supported in GCC4.1 and that's the C compiler i am using .
    Does anyone know of a similar way this canbe achieved ..

    if (strlcpy(addr.s path, options.cpath,
    sizeof(addr.spa th)) >= sizeof(addr.spa th)
  • mustoor
    New Member
    • Aug 2006
    • 1

    #2
    Originally posted by nano2
    Hi all,

    I have the following scenario but strlcpy is not supported in GCC4.1 and that's the C compiler i am using .
    Does anyone know of a similar way this canbe achieved ..

    if (strlcpy(addr.s path, options.cpath,
    sizeof(addr.spa th)) >= sizeof(addr.spa th)
    *********______ _________****** ***********

    try out memcpy

    Comment

    • oler1s
      Recognized Expert Contributor
      • Aug 2007
      • 671

      #3
      strlcopy is non standard. It is not a part of C, so if your previous compiler supported it (I'm guessing Borland, as it seems to have pascal/delphi roots), well don't bet on it. But you did know this before you started using strlcopy, right?

      I don't know what the functionality of strlcopy is. Mind describing it to us? If you can quote manual text, or something precise, please do so.

      Comment

      Working...