/**-- Words making sense in POSIX-like systems only. Copyright (C) Tektronix, Inc. 1998 - 2001. All rights reserved. @see GNU LGPL @author Tektronix CTE %derived_by: guidod % @version %version: bln_mpt1!5.22 % (%date_modified: Tue Nov 13 17:07:02 2001 %) */ /* @description This file exports a set of system words for a posixish OS environment. So should do any alternative wordset you might create for your OS. @{ */ #if defined(__version_control__) && defined(__GNUC__)static char* id __attribute__((unused)) = "@(#) $Id: %full_filespec: posix-ext.c~bln_mpt1!5.22:csrc:bln_12xx!1 % $" #endif #define _P4_SOURCE 1 #include <pfe/pfe-base.h> #include <pfe/def-xtra.h> #include <stdio.h> #include <errno.h> #include <limits.h> #include <string.h> #include <time.h> #ifdef VxWorks #include <sysLib.h> #endif #if defined PFE_HAVE_WINBASE_H /*; --target mingw32msvc */ # undef LP # undef CONTEXT # include <windows.h> #endif /*ntohl() */ #ifndef HOST_WIN32 /*FIXME: #ifdef PFE_HAVE_NETINET_IN_H */ #include <netinet/in.h> /*FIXME: #endif */ #else /*well, here's a highlevel copy... */ /*(btw, #include <winsock.h> ... would make a dependency on -lws32 !!!) */ # if PFE_BYTEORDER+0 == 4321 # define ntohl(x) (x) # define ntohs(x) (x) # define htonl(x) (x) # define htons(x) (x) # else # define ntohl(x) ((((x) & 0x000000ff) << 24) | \ (((x) & 0x0000ff00) << 8) | \ (((x) & 0x00ff0000) >> 8) | \ (((x) & 0xff000000) >> 24)) # define htonl(x) ((((x) & 0x000000ff) << 24) | \ (((x) & 0x0000ff00) << 8) | \ (((x) & 0x00ff0000) >> 8) | \ (((x) & 0xff000000) >> 24)) # define ntohs(x) ((((x) & 0x00ff) << 8) | \ (((x) & 0xff00) >> 8)) # define htons(x) ((((x) & 0x00ff) << 8) | \ (((x) & 0xff00) >> 8)) # endif #endif #include <pfe/_nonansi.h> #include <pfe/_missing.h> #include <pfe/logging.h> /***/ /* CLOCKS_PER_SEC - usually one million ticks, but can be <i>very</i> different on a specific system. Exported as a constant. see => CLOCK "CLK_TCK" */ #ifdef CLOCKS_PER_SEC_BUG #undef CLOCKS_PER_SEC #define CLOCKS_PER_SEC sysClkRateGet() #endif #if !(defined SYS_EMX || defined HOST_OS_WATCOM) #define DEFINED_ignore_line
/**
|
/**
|
/**
|
/**
|
/**
|
/**
|
P4_LISTWORDS (posix) =
|
/* |