Re: [Courier-imap] imapd patch replacing malloc, strcat and strcpy with asprintf
Brought to you by:
mrsam
From: Peter M. <pe...@pe...> - 2014-04-20 03:23:26
|
Here's another example too: $ cat f.c #include <stdio.h> int main() { char *p; asprintf(&p, "%s", "test"); printf("%s", p); return 0; } $ gcc -o f f.c $ ./f test$ uname -a OpenBSD Nostos 5.5 GENERIC.MP#72 amd64 $ I used gmake on OpenBSD and it compiled courier-imap without an issue. I hope that clarifies what I was looking at. On 04/19/14 23:12, Peter Malone wrote: > I complied it on OpenBSD without an issue. > > > On 04/19/14 23:08, Sam Varshavchik wrote: >> Peter Malone writes: >> >>> Would it not be worth considering supporting GNU extensions? >> >> What do you propose to do about non-GNU platforms, like FreeBSD? >> >> >>> On Sat, 2014-04-19 at 18:32 -0400, Sam Varshavchik wrote: >>> > Peter Malone writes: >>> > >>> > > Hi, >>> > > >>> > > Please find the following patch which cleans up some malloc, >>> strcpy and >>> > > strcat calls and replaces them with asprintf. There are more >>> calls which >>> > > need to be cleaned up, and if you like I'll continue working on >>> those as >>> > > well. >>> > >>> > asprintf is a GNU extension, and this will not build on non-Linux >>> platforms. >>> > Pretty sure it won't build on FreeBSD, so this won't work, I'm >>> afraid. >>> > >>> > >>> ------------------------------------------------------------------------------ >>> > Learn Graph Databases - Download FREE O'Reilly Book >>> > "Graph Databases" is the definitive new guide to graph databases >>> and their >>> > applications. Written by three acclaimed leaders in the field, >>> > this first edition is now available. Download your free book today! >>> > http://p.sf.net/sfu/NeoTech >>> > _______________________________________________ Courier-imap >>> mailing list Cou...@li... Unsubscribe: >>> https://lists.sourceforge.net/lists/listinfo/courier-imap >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> Learn Graph Databases - Download FREE O'Reilly Book >>> "Graph Databases" is the definitive new guide to graph databases and >>> their >>> applications. Written by three acclaimed leaders in the field, >>> this first edition is now available. Download your free book today! >>> http://p.sf.net/sfu/NeoTech >>> _______________________________________________ >>> Courier-imap mailing list >>> Cou...@li... >>> Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and their >> applications. Written by three acclaimed leaders in the field, >> this first edition is now available. Download your free book today! >> http://p.sf.net/sfu/NeoTech >> >> >> _______________________________________________ >> Courier-imap mailing list >> Cou...@li... >> Unsubscribe:https://lists.sourceforge.net/lists/listinfo/courier-imap > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > > > _______________________________________________ > Courier-imap mailing list > Cou...@li... > Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap |