summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct5
-rw-r--r--build.txt4
-rw-r--r--gpsctl.c9
-rw-r--r--libgpsd_core.c11
-rw-r--r--www/hacking.html.in8
5 files changed, 6 insertions, 31 deletions
diff --git a/SConstruct b/SConstruct
index be83f67f..fab77612 100644
--- a/SConstruct
+++ b/SConstruct
@@ -703,11 +703,6 @@ else:
else:
confdefs.append("#define %s \"%s\"\n" % (key.upper(), value))
- if config.CheckFunc("pselect"):
- confdefs.append("/* #undef COMPAT_SELECT */\n")
- else:
- confdefs.append("#define COMPAT_SELECT\n")
-
if config.CheckHeader(["sys/types.h", "sys/time.h", "sys/timepps.h"]):
confdefs.append("#define HAVE_SYS_TIMEPPS_H 1\n")
kpps = True
diff --git a/build.txt b/build.txt
index 8c946972..1f784853 100644
--- a/build.txt
+++ b/build.txt
@@ -31,9 +31,7 @@ We consider failure to build and function on any of these platforms
a serious bug; if you encounter it, please complain on the
development list.
-Macintosh OS X has been dropped from the list of supported platforms
-due to serial-layer flakiness that has persisted through 10.9 and
-10.10.
+Port difficulty to any system conforming to POSIX-2001.1 should be minimal.
A Cygwin port is in progress but not complete.
diff --git a/gpsctl.c b/gpsctl.c
index 5dbf2069..0f000956 100644
--- a/gpsctl.c
+++ b/gpsctl.c
@@ -71,9 +71,6 @@ static bool gps_query(/*@out@*/struct gps_data_t *gpsdata,
char buf[BUFSIZ];
va_list ap;
time_t starttime;
-#ifdef COMPAT_SELECT
- struct timeval tv;
-#else
struct timespec tv;
sigset_t oldset, blockset;
@@ -83,7 +80,6 @@ static bool gps_query(/*@out@*/struct gps_data_t *gpsdata,
(void)sigaddset(&blockset, SIGTERM);
(void)sigaddset(&blockset, SIGQUIT);
(void)sigprocmask(SIG_BLOCK, &blockset, &oldset);
-#endif /* COMPAT_SELECT */
va_start(ap, fmt);
(void)vsnprintf(buf, sizeof(buf)-2, fmt, ap);
@@ -107,13 +103,8 @@ static bool gps_query(/*@out@*/struct gps_data_t *gpsdata,
/*@ -usedef -type -nullpass -compdef @*/
tv.tv_sec = 2;
-#ifdef COMPAT_SELECT
- tv.tv_usec = 0;
- if (select(gpsdata->gps_fd + 1, &rfds, NULL, NULL, &tv) == -1) {
-#else
tv.tv_nsec = 0;
if (pselect(gpsdata->gps_fd + 1, &rfds, NULL, NULL, &tv, &oldset) == -1) {
-#endif
if (errno == EINTR || !FD_ISSET(gpsdata->gps_fd, &rfds))
continue;
gpsd_report(&context.errout, LOG_ERROR, "select %s\n", strerror(errno));
diff --git a/libgpsd_core.c b/libgpsd_core.c
index 16ac261e..a8cd72e3 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -998,9 +998,6 @@ int gpsd_await_data(/*@out@*/fd_set *rfds,
/* await data from any socket in the all_fds set */
{
int status;
-#ifdef COMPAT_SELECT
- struct timeval tv;
-#endif /* COMPAT_SELECT */
FD_ZERO(efds);
(void)memcpy((char *)rfds, (char *)all_fds, sizeof(fd_set));
@@ -1013,20 +1010,14 @@ int gpsd_await_data(/*@out@*/fd_set *rfds,
* select(2) has to poll here as small as possible (for
* low-clock-rate SBCs and the like).
*
- * pselect() is preferable, when we can have it, to eliminate
+ * pselect() is preferable to vanilla select, to eliminate
* the once-per-second wakeup when no sensors are attached.
* This cuts power consumption.
*/
/*@ -usedef -nullpass @*/
errno = 0;
-#ifdef COMPAT_SELECT
- tv.tv_sec = 1;
- tv.tv_usec = 0;
- status = select(maxfd + 1, rfds, NULL, NULL, &tv);
-#else
status = pselect(maxfd + 1, rfds, NULL, NULL, NULL, NULL);
-#endif
if (status == -1) {
if (errno == EINTR)
return AWAIT_NOT_READY;
diff --git a/www/hacking.html.in b/www/hacking.html.in
index bbe36258..1ebaae96 100644
--- a/www/hacking.html.in
+++ b/www/hacking.html.in
@@ -511,10 +511,10 @@ uClibc. Instead, rely on what POSIX guarantees.</p>
formatting. Be aware that if your patch seems disharmonious with what
is around it, your code may be reformatted, so try to blend in.</p>
-<p>You may rely on a full POSIX and Single Unix Standard binding to
-the operating system. Someday it is possible we may have a Windows
-port, but we refuse to cripple or overcomplicate the codebase in
-advance.</p>
+<p>You may rely on a full POSIX (in particular, POSIX-2001.1) and
+Single Unix Standard binding to the operating system. Someday it is
+possible we may have a Windows port, but we refuse to cripple or
+overcomplicate the codebase in advance.</p>
<p>Do not litter the code with undocumented magic numbers! This is
especially important for buffer lengths, because unsynchronized