pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/libfetch/files fix build with Sun Studio by not us...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d6833ff85dad
branches:  trunk
changeset: 541861:d6833ff85dad
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Sat Apr 26 22:42:49 2008 +0000

description:
fix build with Sun Studio by not using ranges in case stmt.

diffstat:

 net/libfetch/files/fetch.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (24 lines):

diff -r 6cd0c1ef1e39 -r d6833ff85dad net/libfetch/files/fetch.c
--- a/net/libfetch/files/fetch.c        Sat Apr 26 22:06:27 2008 +0000
+++ b/net/libfetch/files/fetch.c        Sat Apr 26 22:42:49 2008 +0000
@@ -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 <joerg%NetBSD.org@localhost>
@@ -300,10 +300,11 @@
 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 '_':



Home | Main Index | Thread Index | Old Index