There were problems with the console parameter size, so switching that to signed seems fine.
However, switching the more general standard approach from unsigned to signed is more dangerous.
Signed operations are much more fickle when overflowing or when using bitwise operations.
In fact, the C standards leave a lot of this behavior as undefined.
Much of the logic used in operating and manipulating array lengths (as counters or with bitwise operations such as << or >>) is affected by the previous change from signed to unsigned.
Avoid these signed problems by reverting this behavario.
The console parameter length will remain as a signed.
see:
7199b83b9596855a9929d12e5942cc541c194b5f
*
* There are problems in some libc's and systems that do not handle lengths greater than 2^63.
* This is primarily a problem with libc string functions.
- * For general compatiblity reasons, this is set to a signed 64-bit integer.
+ * This may need to be set to a signed 64-bit integer on some system (or a smaller unsigned).
+ * There are problems, however, with signed integers and binary operations as well as with overflows to be aware of.
*/
#ifndef _di_f_array_t_
- typedef f_number_signed_t f_array_length_t;
+ typedef f_number_unsigned_t f_array_length_t;
- #define f_array_length_t_size f_type_size_64_positive
- #define f_array_length_t_size_max f_type_size_max_64_positive
+ #define f_array_length_t_size f_number_t_size_unsigned
+ #define f_array_length_t_size_max f_number_t_size_max_unsigned
#endif // _di_f_array_t_
/**