Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fixes for MSVC. #49

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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