summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNeale Ferguson <neale@sinenomine.net>2011-01-12 09:22:25 +0100
committerMartin Sustrik <sustrik@250bpm.com>2011-01-12 09:22:25 +0100
commit70513871082462c957e46986040ebe7b10d64557 (patch)
treee3ac79e6604f3b8b679df7deca54e7e0bbf8cf9c /src
parent725ebce13ca7871002063c4a254bf532d35ee878 (diff)
Support dynamic generation of C preprocessor definitions for PGM rather than hardcoding them.
Signed-off-by: Neale Ferguson <neale@sinenomine.net>
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am14
-rw-r--r--src/clock.cpp5
2 files changed, 6 insertions, 13 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 0b00f1c..3286bc4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -207,25 +207,13 @@ libpgm_diff_flags = \
else
libpgm_diff_flags = \
- -DCONFIG_HAVE_GETPROTOBYNAME_R2 \
- -DCONFIG_HAVE_ISO_VARARGS \
- -DCONFIG_HAVE_ALLOCA_H \
-DCONFIG_HAVE_PROC \
-DCONFIG_HAVE_BACKTRACE \
- -DCONFIG_HAVE_PSELECT \
- -DCONFIG_HAVE_RTC \
- -DCONFIG_HAVE_TSC \
- -DCONFIG_HAVE_HPET \
- -DCONFIG_HAVE_POLL \
- -DCONFIG_HAVE_EPOLL \
- -DCONFIG_HAVE_GETIFADDRS \
-DCONFIG_HAVE_IFR_NETMASK \
-DCONFIG_HAVE_MCAST_JOIN \
-DCONFIG_HAVE_IP_MREQN \
-DCONFIG_HAVE_SPRINTF_GROUPING \
- -DCONFIG_HAVE_VASPRINTF \
- -DCONFIG_BIND_INADDR_ANY \
- -DCONFIG_HAVE_GETOPT
+ -DCONFIG_BIND_INADDR_ANY
endif
libpgm_la_CFLAGS = -I$(top_srcdir)/foreign/openpgm/@pgm_basename@/openpgm/pgm/include/ @LIBZMQ_EXTRA_CFLAGS@ \
diff --git a/src/clock.cpp b/src/clock.cpp
index e18a715..e95b5f6 100644
--- a/src/clock.cpp
+++ b/src/clock.cpp
@@ -106,6 +106,11 @@ uint64_t zmq::clock_t::rdtsc ()
} tsc;
asm("rdtsc" : "=a" (tsc.u32val [0]), "=d" (tsc.u32val [1]));
return tsc.u64val;
+#elif defined(__s390__)
+ uint64_t tsc;
+ asm("\tstck\t%0\n" : "=Q" (tsc) : : "cc");
+ tsc >>= 12; /* convert to microseconds just to be consistent */
+ return(tsc);
#else
return 0;
#endif