nalgeon / sqlean

The ultimate set of SQLite extensions
MIT License
3.67k stars 117 forks source link

feat: add ipaddr extension #22

Closed vincentbernat closed 2 years ago

vincentbernat commented 3 years ago

This PR also contains PR #21. I'll rebase once its fate is decided.

nalgeon commented 2 years ago

Where is the source code coming from — is it yours or copied/adapted from somewhere? Will it work on Windows?

vincentbernat commented 2 years ago

It is my own code. I'll rebase and check if it compiles for Windows then.

nalgeon commented 2 years ago

I see. Thanks a lot for your contribution!

check if it compiles for Windows

It does not:

src/sqlite3-ipaddr.c:9:10: fatal error: sys/socket.h: No such file or directory

I think that's OK. Please make it clear in ipaddr.md that the extension is not available for Windows (and remove it from the compile-windows task). Also, there is a misleading top-level comment in sqlite3-ipaddr.c. Otherwise, I'm ready to merge.

vincentbernat commented 2 years ago

Let me give another try. inet_pton and inet_ntop only needs arpa/inet.h. Let's see if it's available on Windows.

nalgeon commented 2 years ago

Nope:

src/sqlite3-ipaddr.c:9:10: fatal error: arpa/inet.h: No such file or directory
vincentbernat commented 2 years ago

OK, I give up for now. I have removed the compilation for Windows and added a note in the documentation.

vincentbernat commented 2 years ago

Sorry, I am too dumb, I did remove the extension for MacOS...

nalgeon commented 2 years ago

I've just merged the PR and released 0.9.1. It's great to have your extension added to the pack! Thank you 🙏