summaryrefslogtreecommitdiff
path: root/graphics/asymptote/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/common.h')
-rw-r--r--graphics/asymptote/common.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/graphics/asymptote/common.h b/graphics/asymptote/common.h
index 8b45967d1f..80dfef8ac3 100644
--- a/graphics/asymptote/common.h
+++ b/graphics/asymptote/common.h
@@ -16,7 +16,7 @@
#include "config.h"
#endif
-#if !defined(FOR_SHARED) && \
+#if !defined(FOR_SHARED) && \
((defined(HAVE_LIBGL) && defined(HAVE_LIBGLUT) && defined(HAVE_LIBGLM)) || \
defined(HAVE_LIBOSMESA))
#define HAVE_GL
@@ -88,4 +88,13 @@ using mem::istringstream;
using mem::ostringstream;
using mem::stringbuf;
-#endif
+static const struct ws_t {} ws={};
+
+// Portable way of skipping whitespace
+inline std::istream &operator >> (std::istream & s, const ws_t &ws) {
+ if(!s.eof())
+ s >> std::ws;
+ return s;
+}
+
+#endif