struct peer *peer
)
{
- struct refclockproc *pp;
- register struct hopfpciTime *up;
-
- pp = peer->procptr;
- up = (struct hopfpciTime *)pp->unitptr;
#ifndef SYS_WINNT
close(fd);
#else
CloseHopfDevice();
-/* UnmapViewOfFile (up); */
#endif
}
)
{
struct refclockproc *pp;
- register struct hopfpciTime *up;
HOPFTIME m_time;
pp = peer->procptr;
- up = (struct hopfpciTime *)pp->unitptr;
#ifndef SYS_WINNT
ioctl(fd,HOPF_CLOCK_GET_UTC,&m_time);
if(NULL != out)
{
- static char outstatus[800]; /* status output buffer */
char *tt;
char tmpbuf[80];
- outstatus[0] = '\0';
out->kv_list = (struct ctl_var *)0;
out->type = REFCLK_NEOCLOCK4X;
{
int optionValue = SO_SYNCHRONOUS_NONALERT;
int err;
+
err = setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, (char *)&optionValue, sizeof(optionValue));
if (err != NO_ERROR) {
(void) fprintf(stderr, "cannot open nonoverlapped sockets\n");
int af
)
{
- int err;
int sockaddr_len;
struct addrinfo hints, *ai = NULL;
NI_NUMERICHOST);
}
return 1;
- } else if ((err = getaddrinfo(hname, "ntp", &hints, &ai)) == 0) {
+ } else if (getaddrinfo(hname, "ntp", &hints, &ai) == 0) {
memmove((char *)num, ai->ai_addr, ai->ai_addrlen);
if (fullhost != 0)
(void) strcpy(fullhost, ai->ai_canonname);
{
int optionValue = SO_SYNCHRONOUS_NONALERT;
int err;
+
err = setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, (char *)&optionValue, sizeof(optionValue));
if (err != NO_ERROR) {
(void) fprintf(stderr, "cannot open nonoverlapped sockets\n");
int af
)
{
- int err;
int sockaddr_len;
struct addrinfo hints, *ai = NULL;
getnameinfo((struct sockaddr *)num, sockaddr_len,
fullhost, sizeof(fullhost), NULL, 0,
NI_NUMERICHOST);
-
}
return 1;
- } else if ((err = getaddrinfo(hname, "ntp", &hints, &ai)) == 0) {
+ } else if (getaddrinfo(hname, "ntp", &hints, &ai) == 0) {
memmove((char *)num, ai->ai_addr, ai->ai_addrlen);
if (ai->ai_canonname != 0)
(void) strcpy(fullhost, ai->ai_canonname);