GSoC/GCI Archive
Google Code-in 2012 BRL-CAD

Implement a portable bu_gethostname() function

completed by: Cezar

mentors: Sean

This task involves implementing a PORTABLE function that returns the name of the runtime machine.  Your function needs to at least work on Mac, Linux, and Windows (work with our devs if you don't have access to one and need them to help you test compiles).

You're welcome to define the initial prototype as you see fit, but you should integrate your function in as a new file in src/libbu and edit src/libbu/CMakeLists.txt accordingly.  Submit your work as a single patch file, not separate files.  See http://brlcad.org/wiki/Deuces to get started and for help creating a patch.

Do NOT plagiarize code you find out on the web.  Figure it out and implement the function leveraging our existing libbu API (see include/bu.h for details, like our vls string handling and memory management).  The function will need to comply with our HACKING developer guidelines.