_dinsdale

jsish-freebsd-clang-patch

Mar 18th, 2017
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.58 KB | None | 0 0
  1. Index: jsi/Makefile
  2. ==================================================================
  3. --- jsi/Makefile
  4. +++ jsi/Makefile
  5. @@ -1,12 +1,12 @@
  6.  # Makefile for jsish: controlled by make.conf from configure.
  7. -INCS=-I.
  8. +INCS=-I. -I/usr/local/include
  9.  WEBSOCKDIR = ../libwebsockets
  10.  SQLITEDIR = ../sqlite3
  11.  ACFILES    = parser.c
  12.  #ACFILES   = jsiParser.c
  13. -CFLAGS += -fno-diagnostics-show-caret -Wsign-compare -Wtype-limits -Wuninitialized
  14. +CFLAGS += -Wsign-compare -Wtype-limits -Wuninitialized
  15.  #CFLAGS += -fsanitize=address
  16.  #ASAN_OPTIONS=abort_on_error=1
  17.  MAKEFILE=Makefile
  18.  CMAKE=cmake
  19.  
  20. @@ -135,11 +135,11 @@
  21.  PROGLDFLAGS += $(WEBSOCKLIB)
  22.  
  23.  ifeq ($(JSI__LOAD),1)
  24.  LNKFLAGS += -rdynamic
  25.  COPTS = -fpic
  26. -PROGLDFLAGS += -ldl
  27. +#PROGLDFLAGS += -ldl
  28.  endif
  29.  
  30.  ifeq ($(JSI__THREADS),1)
  31.  PROGLDFLAGS += -lpthread
  32.  endif
  33. @@ -171,11 +171,11 @@
  34.  PROGLDFLAGS += $(USERLIB)
  35.  OBJS    = $(CFILES:.c=.o) $(EFILES:.c=.o)
  36.  DEFIN  =
  37.  CFLAGS += -g -Wall $(COPTS) $(DEFIN) $(INCS) $(PROGFLAGS) $(OPTS)
  38.  YACC   = bison -v
  39. -LDFLAGS = -lm $(PROGLDFLAGS)
  40. +LDFLAGS = -L/usr/local/lib -lm $(PROGLDFLAGS)
  41.  SHLEXT=.so
  42.  
  43.  PREFIX=/usr/local
  44.  ZIPDIR=zipdir
  45.  BLDDIR=$(PWD)
  46.  
  47. Index: jsi/configure
  48. ==================================================================
  49. --- jsi/configure
  50. +++ jsi/configure
  51. @@ -1,11 +1,11 @@
  52.  #!/bin/sh
  53.  
  54.  # The configure.js script uses jsimin so build it.
  55.  if [ ! -x jsimin ]; then
  56. -    make clean
  57. -    make -f Makefile MAKECONF=Configs/make_minimal.conf
  58. -    make clean
  59. +    gmake clean
  60. +    gmake -f Makefile MAKECONF=Configs/make_minimal.conf
  61. +    gmake clean
  62.      echo "Created jsimin"
  63.  fi
  64.  ./jsimin tools/configure.js $*
  65.  
  66.  
  67. Index: jsi/jsi.c
  68. ==================================================================
  69. --- jsi/jsi.c
  70. +++ jsi/jsi.c
  71. @@ -39,10 +39,12 @@
  72.  #define JSI_INFO(n) NULL
  73.  #endif
  74.  #ifndef JSI_INFO
  75.  #define JSI_INFO(n) n
  76.  #endif
  77. +
  78. +typedef int (*__compar_fn_t) (const void *, const void *);
  79.  
  80.  /* --ENUMS-- */
  81.  typedef enum {
  82.      /* Jsi Return Codes. */
  83.      JSI_OK=0, JSI_ERROR=1, JSI_RETURN=2, JSI_BREAK=3,
  84.  
  85. Index: jsi/jsiZvfs.c
  86. ==================================================================
  87. --- jsi/jsiZvfs.c
  88. +++ jsi/jsiZvfs.c
  89. @@ -40,10 +40,12 @@
  90.  */
  91.  #define COMPR_BUF_SIZE   8192
  92.  #ifdef __WIN32
  93.  static int maptolower=0;
  94.  #endif
  95. +
  96. +typedef int (*__compar_fn_t) (const void *, const void *);
  97.  
  98.  typedef enum { ZVFS_SIG_PINFO = 0xbeefbeed, ZVFS_SIG_ARCHIVE, ZVFS_SIG_FILE, ZVFS_SIG_ZFILE } ZVFS_Sig;
  99.  #define ZVFSSIGASSERT(s,n) assert(s->sig == ZVFS_SIG_##n)
  100.  /*
  101.  ** All static variables are collected into a structure named "zvfslocal".
Add Comment
Please, Sign In to add comment