timeout.tv_sec = 0;
timeout.tv_usec = 0;
-#if defined(SVR4) || defined(__osf__) || defined(__hpux) || defined(__OpenBSD__)
+#if defined(SVR4) || defined(__osf__) || defined(__hpux) || defined(__OpenBSD__) || defined(linux)
select(max_fds, (fd_set*)&read_fd_vect, NULL, (fd_set*)&except_fd_vect, &timeout);
#else
/* UX has select defined with int*, not fd_set* parms */
#include <stdarg.h>
#include <sys/utsname.h>
#include <limits.h>
+#include <stdint.h>
#define X_INCLUDE_PWD_H
#define XOS_USE_XT_LOCKING
dptr->data[dptr->offset+dptr->len]=0;
fprintf(SPC_Print_Protocol,
- "%s channel: %x, request: %d, length: %d, seq: %d data: %s\n",
+ "%s channel: %p, request: %d, length: %d, seq: %d data: %s\n",
name, proto->channel, proto->request_type, dptr->len, proto->seqno,
dptr->data+dptr->offset);
/* We are overloading the "channel" field. We put the cid rather */
/* than the actual channel pointer in when we pass it to the other */
/* side of the connection. */
- prot_request->channel=(SPC_Channel_Ptr)(channel ? channel->cid : 0);
+ prot_request->channel=(SPC_Channel_Ptr) (intptr_t) (channel ? channel->cid : 0);
switch (request) {
#include <bms/sbport.h> /* NOTE: sbport.h must be the first include. */
#include <signal.h>
+#include <stdint.h>
#include <bms/bms.h>
#include <bms/Symbolic.h>
/*-------------------------------------------------------------------------+*/
{
XeSymbol sym = Xe_intern(Xe_sig_table, name);
- sym->value = (void *)value;
+ sym->value = (void *) (intptr_t) value;
}
/*-------------------------------------------------------------------------+*/
sym = Xe_lookup(Xe_sig_table, name);
_DtSvcProcessUnlock();
- return (sym) ? (int) sym->value : XE_SIG_NOT_IN_TABLE;
+ return (sym) ? (intptr_t) sym->value : XE_SIG_NOT_IN_TABLE;
}
/*-------------------------------------------------------------------------+*/
if ((ThisBit = _DtActFieldBitLookup(XrmQuarkToString(fields[i].fieldName))) != 0)
{
- switch ((int)(fieldVal=_DtActValidateFieldValue(ThisBit,
+ switch ((intptr_t)(fieldVal=_DtActValidateFieldValue(ThisBit,
fields[i].fieldValue, fields[0].fieldValue,
fileName)))
{
* Save the current directory and then "chdir" to the directory
* to do the execution. If the chdir fails, return.
*/
- (void) getcwd (tmpDir, MAXPATHLEN);
+ if(NULL == getcwd (tmpDir, MAXPATHLEN))
+ {
+ perror(strerror(errno));
+ return (_CMD_EXECUTE_FAILURE);
+ }
if (!_DtCmdValidDir (_cmdClientHost, contextDir, contextHost))
{
Cmd_FreeAllocatedStringVector (commandArray);
(void) sprintf (errorMessage, errorChdir, contextDir, execHost);
- (void) chdir (tmpDir);
+ if(-1 == chdir (tmpDir)) {
+ perror(strerror(errno));
+ }
return (_CMD_EXECUTE_FAILURE);
}
if (commandPid < 0)
{
Cmd_FreeAllocatedStringVector (commandArray);
- (void) chdir (tmpDir);
+ if(-1 == chdir (tmpDir)) {
+ perror(strerror(errno));
+ }
(void) sprintf(errorMessage, errorFork, execHost);
(void) _DtEnvControl (DT_ENV_RESTORE_POST_DT);
return (_CMD_EXECUTE_FAILURE);
#include <stdlib.h>
#include <stdarg.h>
+#include <stdint.h>
#include <X11/Intrinsic.h>
#include <Xm/AtomMgr.h>
#include <Xm/DragDrop.h>
dndDropSiteDestroy, NULL);
XDeleteContext(display, dndGetContextXID(display),
- (XContext)dropReceiver);
+ (XContext)(intptr_t)dropReceiver);
_DtDndDestroyTransfers(dtDropInfo->transfers, dtDropInfo->numTransfers);
int status;
status = XSaveContext(display, dndGetContextXID(display),
- (XContext)dropReceiver, (XPointer)dtDropInfo);
+ (XContext)(intptr_t)dropReceiver, (XPointer)dtDropInfo);
return (status == 0);
}
DtDropInfo * dtDropInfo;
status = XFindContext(display, dndGetContextXID(display),
- (XContext)dropReceiver, (XPointer *)&dtDropInfo);
+ (XContext)(intptr_t)dropReceiver, (XPointer *)&dtDropInfo);
if (status != 0)
dtDropInfo = (DtDropInfo *)NULL;
int status;
_DtSvcProcessLock();
- if (dragCollectionContext == (XContext)NULL) {
+ if (dragCollectionContext == (XContext)0) {
dragCollectionContext = XUniqueContext();
}
_DtSvcProcessUnlock();
if(tbl->hash_type == String_Key)
tmp = tbl->table[bucket = hash_string(key, tbl->size)];
else
- tmp = tbl->table[bucket = abs((int)key) % tbl->size];
+ tmp = tbl->table[bucket = abs((int)(intptr_t)key) % tbl->size];
if(tbl->hash_type == String_Key)
while(tmp!=NULL)
}
else
{
- tmp = tbl->table[abs((int)key) % tbl->size];
+ tmp = tbl->table[abs((int)(intptr_t)key) % tbl->size];
for(;tmp!=NULL; tmp = tmp->next_entry)
if(tmp->key == key)
return((void *)&tmp->data);
if(tbl->hash_type == String_Key)
bucket = hash_string(key, tbl->size);
else
- bucket = abs((int)key) % tbl->size;
+ bucket = abs((int)(intptr_t)key) % tbl->size;
if((tmp = tbl->table[bucket])==NULL)
return(NULL);
char *c;
int match = 0;
- if(path && (int)path != -1)
+ if(path && (intptr_t)path != -1)
{
#ifdef USE_FNMATCH
match = !fnmatch(attr, path, 0);
if (results)
return(results);
- return((int)record1 - (int)record2);
+ return((intptr_t)record1 - (intptr_t)record2);
}
****************************************************************************
************************************<+>*************************************/
#include <stdio.h>
+#include <stdlib.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <Dt/Wsm.h>
#if defined(__hpux) || defined(__osf__) || defined(CSRG_BASED)
{ if (s != NULL) free((void *)s); }
#else
- { if (s != NULL) free((const void *)s); }
+ { if (s != NULL) free((void *)s); }
#endif /* __hpux */
#endif
#if defined(bsd)