*BSD ports and strlcpy

Information, contacts and source code for ports to Linux, Windows, etc.

Moderators: winston, another_commander

Post Reply
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

*BSD ports and strlcpy

Post by winston » Sun Feb 26, 2006 11:26 am

Giles has added some code that uses strlcpy(). Linux and Windows do not have a strlcpy() implementation in their libc, so I've added the OpenBSD strlcpy() to the oolite-linux source.

It's switched on and off with a define - the makefile for *BSD will have to not use -DNEED_STRLCPY. I don't know about Irix or other operating systems. Linux and Windows at least will need -DNEED_STRLCPY in the makefile (perhaps there is some way of determining this in the makefile so separate makefiles won't be needed for different OSen, I'm not yet good enough at make to know how to do this)

User avatar
Spooky
Dangerous
Dangerous
Posts: 108
Joined: Sun Feb 12, 2006 5:05 pm
Location: Portsmouth, UK
Contact:

Post by Spooky » Sun Feb 26, 2006 3:07 pm

Off the top of my head I'm pretty sure IRIX has strlcpy() but I'll have an answer either way tomorrow morning and I'll adjust the *BSD and IRIX packages accordingly. I can also have a bash at the makefile, although I've not messed with GNUmake that much it can't be radically different to the standard IRIX make. (famous last words :lol:) *edit* It turns out one of the int13h chaps has done this OS selecting makefile shenanigans before, I'll get him to give me a hand *edit*

I should be building the 1.63-dev1 Monday morning anyway so I'll roll any changes into that.
Spooky
www.int13h.com
Evil Genius

The most merciful thing in all the world is the inability of the human mind to correlate all of its contents.

Post Reply