1
0
mirror of https://github.com/golang/go synced 2024-11-19 22:14:43 -07:00

cmd/dist: fix build on openbsd

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/5608060
This commit is contained in:
Mikio Hara 2012-02-04 13:27:12 +09:00
parent 715588f1d3
commit 67b277c3b9

View File

@ -396,10 +396,10 @@ mtime(char *p)
bool bool
isabs(char *p) isabs(char *p)
{ {
// c:/ or c:\ // "c:/" or "c:\"
if(('A' <= p[0] && p[0] <= 'Z') || ('a' <= p[0] && p[0] <= 'z')) if(('A' <= p[0] && p[0] <= 'Z') || ('a' <= p[0] && p[0] <= 'z'))
return p[1] == ':' && (p[2] == '/' || p[2] == '\\'); return p[1] == ':' && (p[2] == '/' || p[2] == '\\');
// / or \ // "/" or "\"
return p[0] == '/' || p[0] == '\\'; return p[0] == '/' || p[0] == '\\';
} }