Staging
v0.8.1
https://github.com/python/cpython
Revision b6b7a3ac4713a9df4faed774aa8868cf507adbb8 authored by Tim Peters on 16 March 2006, 01:56:34 UTC, committed by Tim Peters on 16 March 2006, 01:56:34 UTC
Change the Windows buildbot "clean" step to remove
stale .pyc files.
1 parent 854e918
Raw File
Tip revision: b6b7a3ac4713a9df4faed774aa8868cf507adbb8 authored by Tim Peters on 16 March 2006, 01:56:34 UTC
Merge rev 43061 from the trunk.
Tip revision: b6b7a3a
strerror.c

/* PD implementation of strerror() for systems that don't have it.
   Author: Guido van Rossum, CWI Amsterdam, Oct. 1990, <guido@cwi.nl>. */

#include <stdio.h>
#include "Python.h"

extern int sys_nerr;
extern char *sys_errlist[];

char *
strerror(int err)
{
	static char buf[20];
	if (err >= 0 && err < sys_nerr)
		return sys_errlist[err];
	PyOS_snprintf(buf, sizeof(buf), "Unknown errno %d", err);
	return buf;
}
back to top