On Jan 11, 2017, at 3:11 PM, Richard Hipp <d...@sqlite.org> wrote: > > On 1/11/17, Scott Hess <sh...@google.com> wrote: >> UPDATE result SET nRows = system('wc', '-l', fileNames); >> >> ... >> [Though, yes, this means you'll have to use fork() and execlp() and >> waitpid() to implement, rather than popen(). > > Which further means that the code would not be portable to Windows.
There is a way to do popen() in Windows, but it’s reeealy ugly: https://msdn.microsoft.com/en-us/library/ms682499%28VS.85%29.aspx How much doing all that is worth is a different question, since the calls made through this proposed system() SQLite function would also likely be non-portable. In this very example, there is no wc on Windows. This is essentially the same problem that leads to autoconf, autosetup, CMake, etc: you can’t write a portable Makefile, if by “portable” you include non-POSIX OSes. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users