From ae05948c530aeba01151f504db3f46da59065d0b Mon Sep 17 00:00:00 2001 From: tnn Date: Sat, 26 Apr 2008 22:42:49 +0000 Subject: fix build with Sun Studio by not using ranges in case stmt. --- net/libfetch/files/fetch.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'net') diff --git a/net/libfetch/files/fetch.c b/net/libfetch/files/fetch.c index d322054bef6..393dc621243 100644 --- a/net/libfetch/files/fetch.c +++ b/net/libfetch/files/fetch.c @@ -1,4 +1,4 @@ -/* $NetBSD: fetch.c,v 1.11 2008/04/25 19:59:30 joerg Exp $ */ +/* $NetBSD: fetch.c,v 1.12 2008/04/26 22:42:49 tnn Exp $ */ /*- * Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav * Copyright (c) 2008 Joerg Sonnenberger @@ -300,10 +300,11 @@ fetchMakeURL(const char *scheme, const char *host, int port, const char *doc, int fetch_urlpath_safe(char x) { + if ((x >= '0' && x <= '9') || (x >= 'A' && x <= 'Z') || + (x >= 'a' && x <= 'z')) + return 1; + switch (x) { - case 'a'...'z': - case 'A'...'Z': - case '0'...'9': case '$': case '-': case '_': -- cgit v1.2.3