monotone

monotone Mtn Source Tree

Root/unix/os_strerror.cc

1// Copyright (C) 2006 Matthew Gregan <kinetik@.orcon.net.nz>
2// all rights reserved.
3// licensed to the public under the terms of the GNU GPL (>= 2)
4// see the file COPYING for details
5
6#include <string.h>
7
8#include "sanity.hh"
9#include "platform.hh"
10
11std::string
12os_strerror(os_err_t errnum)
13{
14 char* msg = strerror(errnum);
15 if (msg == 0)
16 return (F("unknown error code %d") % errnum).str();
17 return std::string(msg);
18}
19
20// Local Variables:
21// mode: C++
22// fill-column: 76
23// c-file-style: "gnu"
24// indent-tabs-mode: nil
25// End:
26// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status