pcp
[Top] [All Lists]

[patch] strndup is a GNU-ism, needs replacing

To: kenj <kenj@xxxxxxxxxxxxxxxx>
Subject: [patch] strndup is a GNU-ism, needs replacing
From: Nathan Scott <nscott@xxxxxxxxxx>
Date: Tue, 6 Oct 2009 16:50:37 +1100 (EST)
Cc: pcp@xxxxxxxxxxx
In-reply-to: <1433182526.16101254807992385.JavaMail.root@xxxxxxxxxxxxxxxxxx>
Hi Ken,

You've used strndup() in a couple of places, but that routine is only
available via glibc (AFAIK).  So the pcp dev build fails on Windows at
the moment, and likely also on Mac OS X, Solaris, FreeBSD, AIX, etc.

The attached patch is something like what we'll need (Windows build
passes with this) - do you want to commit something like this - the
string length and NULL termination points need checking, this is just
a quick hack to see if this is all we need to get a Win32 build going
again.

thanks!

-- 
Nathan

Attachment: patch
Description: Binary data

<Prev in Thread] Current Thread [Next in Thread>
  • [patch] strndup is a GNU-ism, needs replacing, Nathan Scott <=