]> granicus.if.org Git - graphviz/commitdiff
remove our own CHAR_BIT definitions
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 11 Feb 2021 04:39:38 +0000 (20:39 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 17 Feb 2021 15:38:55 +0000 (07:38 -0800)
We can just use those in the C standard library.

lib/ast/ast.h
lib/ast/chrtoi.c
lib/sfio/sfhdr.h

index fe7b3e844a0245316b9ed348bf0ec13af0233ed6..3253b927a2e4fefcb1fc286ba124567744e6caf4 100644 (file)
@@ -28,9 +28,6 @@ extern "C" {
 #ifndef PATH_MAX
 #define PATH_MAX    1024
 #endif
-#ifndef CHAR_BIT
-#define CHAR_BIT    8
-#endif
 
 #define PATH_PHYSICAL   01
 #define PATH_DOTDOT 02
index a4a872e8600eb570e3d78c55f8ffa55284ffa2a8..9a001687bba316cdeb460f23e094875dee849fd1 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include <ast/ast.h>
+#include <limits.h>
 
 int chrtoi(const char *s)
 {
index 59986d882d14d893931b29ec15abc55e30b1aadb..a5b74b88bd876f2c1d6d7032d7afe91eef1bf4c8 100644 (file)
@@ -56,6 +56,7 @@ extern "C" {
 #undef  HAVE_SYS_IOCTL_H
 #endif
 
+#include       <limits.h>
 #include       <stdlib.h>
 #include       <string.h>
 #include       <stdint.h>
@@ -350,10 +351,6 @@ extern "C" {
 #define RIGHTP         ')'
 #define QUOTE          '\''
 
-#ifndef CHAR_BIT
-#define CHAR_BIT       8
-#endif
-
 #define FMTSET(ft, frm,ags, fv, sz, flgs, wid,pr,bs, ts,ns) \
        ((ft->form = (char*)frm), va_copy(ft->args,ags), \
         (ft->fmt = fv), (ft->size = sz), \