[tlbuild] Patches for mingw

Siep Kroonenberg siepo at bitmuis.nl
Mon Dec 20 17:10:34 CET 2021


On Sat, Dec 18, 2021 at 02:53:10PM -0700, Karl Berry wrote:
>     I also need to look at Naveen's patch for dvisvgm.
> 
> Moves "using namespace std" for w32 stuff. Seems like it might cause
> trouble with different versions of C++, but what do I know ... --thanks, karl.

Maybe you find it safer to put this line inside the #ifdef _WIN32 /
#else / #endif stanza that is already there?

#ifdef _WIN32
	#include <direct.h>
	#include "windows.hpp"
	const char *FileSystem::DEVNULL = "nul";
	const char FileSystem::PATHSEP = '\\';
	#define unlink _unlink
	using namespace std;
#else
	using namespace std;
	#include <dirent.h>
	#include <pwd.h>
	#include <sys/stat.h>
	#include <sys/types.h>
	const char *FileSystem::DEVNULL = "/dev/null";
	const char FileSystem::PATHSEP = '/';
#endif

Then the order would stay the same for non-windows. But for me it is
also `what do I know'. Note that I had to patch FileSystem.hpp as
well.

I tested this for linux and for cross-compiling.

Attached the dvisvgm patch, without the above rearrangement.

Here the corresponding ChangeLog entry. I listed you, Karl,
because you are presumably the person committing them.

21-12-19  Karl Berry  <karl at tug.org>

	* FileSystem.hpp/FileSystem.cpp: mingw: fix for gcc 11
	(by Naveen)

As to the luatex patch: I needed this after all, but only at the
make install stage, which I tested yesterday morning. It does not
apply to or interfere with linux make install. But I am now studying
some files Luigi sent me, to see why he manages without.

-- 
Siep Kroonenberg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dvisvgm.diff.gz
Type: application/gzip
Size: 888 bytes
Desc: not available
URL: <https://tug.org/pipermail/tlbuild/attachments/20211220/0030fada/attachment.gz>


More information about the tlbuild mailing list.