Skip to content

Commit

Permalink
Update the shawnw-math patch + small readme how to deal with patches
Browse files Browse the repository at this point in the history
  • Loading branch information
mindreframer committed Oct 15, 2021
1 parent 4715548 commit e569d6b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
14 changes: 14 additions & 0 deletions diffs/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$ cp src/sqlite3-shawnw_math.c src/sqlite3-shawnw_math-fixed.c

## fix src/sqlite3-shawnw_math-fixed.c...

$ diff -u src/sqlite3-shawnw_math.c src/sqlite3-shawnw_math-fixed.c > diffs/sqlite3-shawnw_math.diff
$ rm src/sqlite3-shawnw_math-fixed.c

## apply patch (-p0 to handle folders!)

`patch -p0 < diffs/sqlite3-shawnw_math.diff`

## reverse patch

`patch -p0 -R < diffs/sqlite3-shawnw_math.diff`
13 changes: 11 additions & 2 deletions diffs/sqlite3-shawnw_math.diff
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
--- src/sqlite3-shawnw_math.c 2021-10-15 15:22:32.000000000 +0200
+++ src/sqlite3-shawnw_math.c 2021-10-15 15:04:03.000000000 +0200
--- src/sqlite3-shawnw_math.c 2021-10-15 17:56:04.000000000 +0200
+++ src/sqlite3-shawnw_math-fixed.c 2021-10-15 17:55:42.000000000 +0200
@@ -28,7 +28,7 @@
#include <stdlib.h>
#include <string.h>

-#include <sqlite3ext.h>
+#include "sqlite3ext.h"
SQLITE_EXTENSION_INIT1

static void mf_deg(sqlite3_context *p, int nArg __attribute__((unused)),
@@ -1402,7 +1402,7 @@
#ifdef _WIN32
__declspec(dllexport)
Expand Down

0 comments on commit e569d6b

Please sign in to comment.