Skip to content

Commit e569d6b

Browse files
committed
Update the shawnw-math patch + small readme how to deal with patches
1 parent 4715548 commit e569d6b

2 files changed

Lines changed: 25 additions & 2 deletions

File tree

diffs/Readme.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
$ cp src/sqlite3-shawnw_math.c src/sqlite3-shawnw_math-fixed.c
2+
3+
## fix src/sqlite3-shawnw_math-fixed.c...
4+
5+
$ diff -u src/sqlite3-shawnw_math.c src/sqlite3-shawnw_math-fixed.c > diffs/sqlite3-shawnw_math.diff
6+
$ rm src/sqlite3-shawnw_math-fixed.c
7+
8+
## apply patch (-p0 to handle folders!)
9+
10+
`patch -p0 < diffs/sqlite3-shawnw_math.diff`
11+
12+
## reverse patch
13+
14+
`patch -p0 -R < diffs/sqlite3-shawnw_math.diff`

diffs/sqlite3-shawnw_math.diff

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
--- src/sqlite3-shawnw_math.c 2021-10-15 15:22:32.000000000 +0200
2-
+++ src/sqlite3-shawnw_math.c 2021-10-15 15:04:03.000000000 +0200
1+
--- src/sqlite3-shawnw_math.c 2021-10-15 17:56:04.000000000 +0200
2+
+++ src/sqlite3-shawnw_math-fixed.c 2021-10-15 17:55:42.000000000 +0200
3+
@@ -28,7 +28,7 @@
4+
#include <stdlib.h>
5+
#include <string.h>
6+
7+
-#include <sqlite3ext.h>
8+
+#include "sqlite3ext.h"
9+
SQLITE_EXTENSION_INIT1
10+
11+
static void mf_deg(sqlite3_context *p, int nArg __attribute__((unused)),
312
@@ -1402,7 +1402,7 @@
413
#ifdef _WIN32
514
__declspec(dllexport)

0 commit comments

Comments
 (0)