emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/emacsql 5bef799b6b 220/427: Make some tweaks to accommodat


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql 5bef799b6b 220/427: Make some tweaks to accommodate Windows.
Date: Tue, 13 Dec 2022 02:59:45 -0500 (EST)

branch: elpa/emacsql
commit 5bef799b6b2288f9fd5f6369b7d25e680897d0d5
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>

    Make some tweaks to accommodate Windows.
---
 sqlite/Makefile  | 11 +++++++++--
 sqlite/emacsql.c |  5 ++---
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/sqlite/Makefile b/sqlite/Makefile
index 3679e6f93c..4e47907d27 100644
--- a/sqlite/Makefile
+++ b/sqlite/Makefile
@@ -1,5 +1,12 @@
-BINARY  = emacsql-sqlite-$(shell uname -sm | tr '[A-Z]' '[a-z]' | tr ' ' '-')
-LDLIBS  = -ldl
+ifeq ($(OS),Windows_NT)
+    OSTUPLE = windows-x86
+    BINARY  = emacsql-sqlite-$(OSTUPLE).exe
+else
+    OSTUPLE = $(shell uname -sm | tr '[A-Z]' '[a-z]' | tr ' ' '-')
+    BINARY  = emacsql-sqlite-$(OSTUPLE)
+    LDLIBS  = -ldl
+endif
+
 CFLAGS  = -O2 --std=c99 -W -Wall -Wextra
 CFLAGS += -DSQLITE_THREADSAFE=0
 CFLAGS += -DSQLITE_DEFAULT_FOREIGN_KEYS=1
diff --git a/sqlite/emacsql.c b/sqlite/emacsql.c
index bb163aa578..3a65f540eb 100644
--- a/sqlite/emacsql.c
+++ b/sqlite/emacsql.c
@@ -80,10 +80,9 @@ int main(int argc, char **argv) {
         fflush(stdout);
 
         /* Gather input from Emacs. */
-        size_t length;
-        int result = scanf("%zu ", &length);
+        unsigned length;
+        int result = scanf("%u ", &length);
         if (result == EOF) {
-            printf("EOF DETECTED\n");
             break;
         } else if (result != 1) {
             send_error(SQLITE_ERROR, "middleware parsing error");



reply via email to

[Prev in Thread] Current Thread [Next in Thread]