Don't use "stdbool.h" because NetBSD 1.6 and 1.6.x (and probably other
platforms) don't have it.
This commit is contained in:
parent
ea57b983e7
commit
494f62f029
3 changed files with 12 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
|||
$NetBSD: distinfo,v 1.2 2003/11/05 00:05:06 recht Exp $
|
||||
$NetBSD: distinfo,v 1.3 2003/11/05 11:54:47 tron Exp $
|
||||
|
||||
SHA1 (coreutils-5.0.tar.bz2) = ce67aacedfc917a92b5be62dd32095393c2f220c
|
||||
Size (coreutils-5.0.tar.bz2) = 3952653 bytes
|
||||
SHA1 (patch-aa) = 352b6b8eeff29159ebdbae4929db75d243a19354
|
||||
SHA1 (patch-ab) = 8cc6bbef46bdaf163129b06bf65ec2b775c57fe2
|
||||
SHA1 (patch-ac) = 761ba2182a191ca215f032228e678c8f0f5549be
|
||||
SHA1 (patch-ab) = 28ad6f03c6c116837a1c4754b0dc09c3488b5ca8
|
||||
SHA1 (patch-ac) = 323a960e5506876f2222723f7b7dec1446c0c30c
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
$NetBSD: patch-ab,v 1.1 2003/11/05 00:05:06 recht Exp $
|
||||
$NetBSD: patch-ab,v 1.2 2003/11/05 11:54:47 tron Exp $
|
||||
|
||||
--- lib/xmalloc.c~ 2002-11-21 21:39:59.000000000 +0100
|
||||
+++ lib/xmalloc.c 2003-11-05 00:26:39.000000000 +0100
|
||||
@@ -22,7 +22,9 @@
|
||||
@@ -22,7 +22,8 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#if STDC_HEADERS
|
||||
+# include <stdbool.h>
|
||||
# include <stdlib.h>
|
||||
+# include <string.h>
|
||||
#else
|
||||
|
@ -30,7 +29,7 @@ $NetBSD: patch-ab,v 1.1 2003/11/05 00:05:06 recht Exp $
|
|||
+/* Return true if array of N objects, each of size S, cannot exist due
|
||||
+ to arithmetic overflow. S must be nonzero. */
|
||||
+
|
||||
+static inline bool
|
||||
+static inline int
|
||||
+array_size_overflow (size_t n, size_t s)
|
||||
+{
|
||||
+ return SIZE_MAX / s < n;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: patch-ac,v 1.1 2003/11/05 00:05:06 recht Exp $
|
||||
$NetBSD: patch-ac,v 1.2 2003/11/05 11:54:47 tron Exp $
|
||||
|
||||
--- src/ls.c~ 2003-03-20 00:01:51.000000000 +0100
|
||||
+++ src/ls.c 2003-11-05 00:34:17.000000000 +0100
|
||||
|
@ -26,7 +26,7 @@ $NetBSD: patch-ac,v 1.1 2003/11/05 00:05:06 recht Exp $
|
|||
-static void indent (int from, int to);
|
||||
-static void init_column_info (void);
|
||||
+static void indent (size_t from, size_t to);
|
||||
+static size_t calculate_columns (bool by_columns);
|
||||
+static size_t calculate_columns (int by_columns);
|
||||
static void print_current_files (void);
|
||||
static void print_dir (const char *name, const char *realname);
|
||||
static void print_file_name_and_frills (const struct fileinfo *f);
|
||||
|
@ -68,7 +68,7 @@ $NetBSD: patch-ac,v 1.1 2003/11/05 00:05:06 recht Exp $
|
|||
- int valid_len;
|
||||
- int line_len;
|
||||
- int *col_arr;
|
||||
+ bool valid_len;
|
||||
+ int valid_len;
|
||||
+ size_t line_len;
|
||||
+ size_t *col_arr;
|
||||
};
|
||||
|
@ -223,8 +223,8 @@ $NetBSD: patch-ac,v 1.1 2003/11/05 00:05:06 recht Exp $
|
|||
|
||||
-static int
|
||||
-get_funky_string (char **dest, const char **src, int equals_end)
|
||||
+static bool
|
||||
+get_funky_string (char **dest, const char **src, bool equals_end,
|
||||
+static int
|
||||
+get_funky_string (char **dest, const char **src, int equals_end,
|
||||
+ size_t *output_count)
|
||||
{
|
||||
int num; /* For numerical codes */
|
||||
|
@ -710,7 +710,7 @@ $NetBSD: patch-ac,v 1.1 2003/11/05 00:05:06 recht Exp $
|
|||
+ of files in the current display width. */
|
||||
+
|
||||
+static size_t
|
||||
+calculate_columns (bool by_columns)
|
||||
+calculate_columns (int by_columns)
|
||||
+{
|
||||
+ size_t filesno; /* Index into files. */
|
||||
+ size_t cols; /* Number of files across. */
|
||||
|
|
Loading…
Reference in a new issue