Skip to content

Commit

Permalink
Build fixes for MSVC.
Browse files Browse the repository at this point in the history
  • Loading branch information
matz-e committed Sep 26, 2023
1 parent b86fc14 commit 71a9359
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/include/OS/dirent.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include <stdlib.h>
#else
#include <io.h>
#if (defined(WIN32) && defined(__MWERKS__))
#if defined(_MSC_VER)
#define ffblk _finddata_t
#define findfirst(a,b,c) _findfirst(a,b)
#define findnext _findnext
Expand Down
10 changes: 5 additions & 5 deletions src/lib/InterViews/printer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ void Printer::character(
out << "\\";
int old_width = out.width(3);
char old_fill = out.fill('0');
out << oct << c << dec;
out << std::oct << c << std::dec;
out.width(old_width);
out.fill(old_fill);
#endif
Expand Down Expand Up @@ -515,7 +515,7 @@ void Printer::stencil(
out << "{currentfile picstr readhexstring pop} imagemask\n";
#ifndef __GNUC__
int old_width = out.width(1);
out << hex;
out << std::hex;
#endif
for (int iy = 0; iy < height; ++iy) {
for (int ix = 0; ix < bytes; ++ix) {
Expand All @@ -536,7 +536,7 @@ void Printer::stencil(
out << "\n";
}
#ifndef __GNUC__
out << dec;
out << std::dec;
out.width(old_width);
#endif
out << "grestore\n";
Expand Down Expand Up @@ -564,7 +564,7 @@ void Printer::image(const Raster* raster, Coord x, Coord y) {
out << "{currentfile picstr readhexstring pop} image\n";
#ifndef __GNUC__
int old_width = out.width(1);
out << hex;
out << std::hex;
#endif
for (int iy = 0; iy < height; ++iy) {
for (int ix = 0; ix < width; ++ix) {
Expand All @@ -583,7 +583,7 @@ void Printer::image(const Raster* raster, Coord x, Coord y) {
out << "\n";
}
#ifndef __GNUC__
out << dec;
out << std::dec;
out.width(old_width);
#endif
out << "grestore\n";
Expand Down
2 changes: 2 additions & 0 deletions src/lib/OS/host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
*/

#include <OS/host.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

char Host::name_[100];

Expand Down

0 comments on commit 71a9359

Please sign in to comment.