Monthly Archives: February 2012

An ugly diff

Recently, I came across a breakage in editors/emacs-devel port (FreeBSD, ofcourse) on SPARC64 architecture caused by having a struct frame defined in both FreeBSD header machine/frame.h (on Sparc) and Emacs header src/frame.h. To fix it, I renamed frame before it gets defined by FreeBSD header files:

++#ifdef __sparc__ 
++#define frame freebsd_sparc_frame
 +#include <sys/user.h>
-+#include <sys/resource.h>
++#ifdef __sparc__ 
++#undef frame

So ugly, wish we had namespaces in C 🙁

P.S. Thanks to tabthorpe (mentor) for his Sparc64 tinderbox 🙂

Writing Portable Network Code

Originally, this was intended to be a two part series about get(addr|name)info() functions which I learnt thanks to GĂŠ Weijers‘ review of my patches to bring IPv6 support to Fossil I submitted months ago. After spending sometime on draft of this post, I decided two part series is way too much for this, and it could just be fit in a single article. And now today, I decided I could just mention the name of functions getaddrinfo(), getnameinfo(), and a link to the thread, and let curious reader figure out what this is about. 🙁


/me fell in love with the lyrics ever since he listened them in Barfuss (the best German film).

Well I’ve seen queens in furcoats struttin’ up and down that strip.
And I’ve seen ladies wearin’ shoes from Paris who thought they were hip.
But I’ll tell you when my heart did really flip and I knew from the start that this is it,
and you were looking so good and you were –
Barefoot – Barefoot.