瀏覽代碼

Upgrade ut* libraries

silvioprog 1 年之前
父節點
當前提交
ef0dc61a37
共有 5 個文件被更改,包括 15 次插入8 次删除
  1. 1 1
      cmake/SgPCRE2.cmake
  2. 1 1
      include/sagui.h
  3. 7 3
      src/uthash.h
  4. 5 2
      src/utlist.h
  5. 1 1
      src/utstring.h

+ 1 - 1
cmake/SgPCRE2.cmake

@@ -21,7 +21,7 @@
 #
 #
 # Cross-platform library which helps to develop web servers or frameworks.
 # Cross-platform library which helps to develop web servers or frameworks.
 #
 #
-# Copyright (C) 2016-2023 Silvio Clecio <[email protected]>
+# Copyright (C) 2016-2024 Silvio Clecio <[email protected]>
 #
 #
 # Sagui library is free software; you can redistribute it and/or
 # Sagui library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # modify it under the terms of the GNU Lesser General Public

+ 1 - 1
include/sagui.h

@@ -74,7 +74,7 @@ extern "C" {
 
 
 #define SG_VERSION_MAJOR 3
 #define SG_VERSION_MAJOR 3
 #define SG_VERSION_MINOR 4
 #define SG_VERSION_MINOR 4
-#define SG_VERSION_PATCH 3
+#define SG_VERSION_PATCH 4
 #define SG_VERSION_HEX                                                         \
 #define SG_VERSION_HEX                                                         \
   ((SG_VERSION_MAJOR << 16) | (SG_VERSION_MINOR << 8) | (SG_VERSION_PATCH))
   ((SG_VERSION_MAJOR << 16) | (SG_VERSION_MINOR << 8) | (SG_VERSION_PATCH))
 
 

+ 7 - 3
src/uthash.h

@@ -1,5 +1,5 @@
 /*
 /*
-Copyright (c) 2003-2021, Troy D. Hanson     http://troydhanson.github.io/uthash/
+Copyright (c) 2003-2022, Troy D. Hanson  https://troydhanson.github.io/uthash/
 All rights reserved.
 All rights reserved.
 
 
 Redistribution and use in source and binary forms, with or without
 Redistribution and use in source and binary forms, with or without
@@ -51,6 +51,8 @@ typedef unsigned char uint8_t;
 #else                   /* VS2008 or older (or VS2010 in C mode) */
 #else                   /* VS2008 or older (or VS2010 in C mode) */
 #define NO_DECLTYPE
 #define NO_DECLTYPE
 #endif
 #endif
+#elif defined(__MCST__)  /* Elbrus C Compiler */
+#define DECLTYPE(x) (__typeof(x))
 #elif defined(__BORLANDC__) || defined(__ICCARM__) || defined(__LCC__) || defined(__WATCOMC__)
 #elif defined(__BORLANDC__) || defined(__ICCARM__) || defined(__LCC__) || defined(__WATCOMC__)
 #define NO_DECLTYPE
 #define NO_DECLTYPE
 #else                   /* GNU, Sun and other compilers */
 #else                   /* GNU, Sun and other compilers */
@@ -450,7 +452,7 @@ do {
 
 
 #define HASH_DELETE_HH(hh,head,delptrhh)                                         \
 #define HASH_DELETE_HH(hh,head,delptrhh)                                         \
 do {                                                                             \
 do {                                                                             \
-  struct UT_hash_handle *_hd_hh_del = (delptrhh);                                \
+  const struct UT_hash_handle *_hd_hh_del = (delptrhh);                          \
   if ((_hd_hh_del->prev == NULL) && (_hd_hh_del->next == NULL)) {                \
   if ((_hd_hh_del->prev == NULL) && (_hd_hh_del->next == NULL)) {                \
     HASH_BLOOM_FREE((head)->hh.tbl);                                             \
     HASH_BLOOM_FREE((head)->hh.tbl);                                             \
     uthash_free((head)->hh.tbl->buckets,                                         \
     uthash_free((head)->hh.tbl->buckets,                                         \
@@ -593,7 +595,9 @@ do {
 
 
 
 
 /* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at
 /* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at
- * http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx */
+ * http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx
+ * (archive link: https://archive.is/Ivcan )
+ */
 #define HASH_SAX(key,keylen,hashv)                                               \
 #define HASH_SAX(key,keylen,hashv)                                               \
 do {                                                                             \
 do {                                                                             \
   unsigned _sx_i;                                                                \
   unsigned _sx_i;                                                                \

+ 5 - 2
src/utlist.h

@@ -1,5 +1,5 @@
 /*
 /*
-Copyright (c) 2007-2021, Troy D. Hanson   http://troydhanson.github.io/uthash/
+Copyright (c) 2007-2022, Troy D. Hanson  https://troydhanson.github.io/uthash/
 All rights reserved.
 All rights reserved.
 
 
 Redistribution and use in source and binary forms, with or without
 Redistribution and use in source and binary forms, with or without
@@ -70,6 +70,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #else                   /* VS2008 or older (or VS2010 in C mode) */
 #else                   /* VS2008 or older (or VS2010 in C mode) */
 #define NO_DECLTYPE
 #define NO_DECLTYPE
 #endif
 #endif
+#elif defined(__MCST__)  /* Elbrus C Compiler */
+#define LDECLTYPE(x) __typeof(x)
 #elif defined(__BORLANDC__) || defined(__ICCARM__) || defined(__LCC__) || defined(__WATCOMC__)
 #elif defined(__BORLANDC__) || defined(__ICCARM__) || defined(__LCC__) || defined(__WATCOMC__)
 #define NO_DECLTYPE
 #define NO_DECLTYPE
 #else                   /* GNU, Sun and other compilers */
 #else                   /* GNU, Sun and other compilers */
@@ -709,7 +711,8 @@ do {
   assert((del)->prev != NULL);                                                                 \
   assert((del)->prev != NULL);                                                                 \
   if ((del)->prev == (del)) {                                                                  \
   if ((del)->prev == (del)) {                                                                  \
       (head)=NULL;                                                                             \
       (head)=NULL;                                                                             \
-  } else if ((del)==(head)) {                                                                  \
+  } else if ((del) == (head)) {                                                                \
+      assert((del)->next != NULL);                                                             \
       (del)->next->prev = (del)->prev;                                                         \
       (del)->next->prev = (del)->prev;                                                         \
       (head) = (del)->next;                                                                    \
       (head) = (del)->next;                                                                    \
   } else {                                                                                     \
   } else {                                                                                     \

+ 1 - 1
src/utstring.h

@@ -1,5 +1,5 @@
 /*
 /*
-Copyright (c) 2008-2021, Troy D. Hanson   http://troydhanson.github.io/uthash/
+Copyright (c) 2008-2022, Troy D. Hanson  https://troydhanson.github.io/uthash/
 All rights reserved.
 All rights reserved.
 
 
 Redistribution and use in source and binary forms, with or without
 Redistribution and use in source and binary forms, with or without