assert( s != NULL );
        assert( v != NULL );
 
+       /* strtoul() has an odd interface */
+       if ( s[ 0 ] == '-' ) {
+               return -1;
+       }
+
        u = strtoul( s, &next, x );
        if ( next == s || next[ 0 ] != '\0' ) {
                return -1;
        assert( s != NULL );
        assert( v != NULL );
 
+       /* strtoul() has an odd interface */
+       if ( s[ 0 ] == '-' ) {
+               return -1;
+       }
+
        ul = strtoul( s, &next, x );
        if ( next == s || next[ 0 ] != '\0' ) {
                return -1;
                unsigned long   u;
                char            *what;
 
+               /* strtoul() has an odd interface */
+               if ( s[ 0 ] == '-' ) {
+                       return -1;
+               }
+
                u = strtoul( s, &next, 10 );
                if ( next == s ) {
                        return -1;