[prev in list] [next in list] [prev in thread] [next in thread]
List: ltp-cvs
Subject: [Ltp-cvs] ltp/lib Makefile,1.6,1.7 parse_opts.c,1.6,1.7 str_to_bytes.c,1.1,1.2 tlibio.c,1.7,1.8 tst_
From: Martin Ridgeway <mridge () users ! sourceforge ! net>
Date: 2005-01-04 21:00:37
Message-ID: E1Clvor-0004F1-9m () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]
Update of /cvsroot/ltp/ltp/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16076
Modified Files:
Makefile parse_opts.c str_to_bytes.c tlibio.c tst_kvercmp.c
tst_sig.c tst_tmpdir.c write_log.c
Log Message:
Porting changes to provide compatability of LTP with Solaris, HP-UX and AIX
Index: str_to_bytes.c
===================================================================
RCS file: /cvsroot/ltp/ltp/lib/str_to_bytes.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** str_to_bytes.c 5 May 2000 19:34:51 -0000 1.1
--- str_to_bytes.c 4 Jan 2005 21:00:30 -0000 1.2
***************
*** 62,67 ****
#elif sgi
#define B_MULT BBSIZE /* block size */
! #elif linux
#define B_MULT DEV_BSIZE /* block size */
#endif
--- 62,69 ----
#elif sgi
#define B_MULT BBSIZE /* block size */
! #elif defined(linux) || defined(__sun) || defined(__hpux)
#define B_MULT DEV_BSIZE /* block size */
+ #elif defined(_AIX)
+ #define B_MULT UBSIZE
#endif
Index: Makefile
===================================================================
RCS file: /cvsroot/ltp/ltp/lib/Makefile,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Makefile 25 Sep 2003 15:45:17 -0000 1.6
--- Makefile 4 Jan 2005 21:00:17 -0000 1.7
***************
*** 1,4 ****
! CFLAGS+= -Wall -I../include
LDFLAGS+=
TARGET=libltp.a
--- 1,13 ----
! ifeq ($(shell uname -s),SunOS)
! CC=gcc -Wall
! endif
! CFLAGS+= -I../include
! ifeq ($(shell uname -s),Linux)
! CFLAGS+= -Wall
! endif
! ifeq ($(shell uname -s),HP-UX)
! CFLAGS+=-Ae -D_LARGEFILE64_SOURCE +DA1.1
! endif
LDFLAGS+=
TARGET=libltp.a
Index: tlibio.c
===================================================================
RCS file: /cvsroot/ltp/ltp/lib/tlibio.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** tlibio.c 18 Jun 2003 17:39:22 -0000 1.7
--- tlibio.c 4 Jan 2005 21:00:34 -0000 1.8
***************
*** 100,104 ****
#include <string.h> /* bzero */
#endif
! #ifdef sgi
#include <aio.h>
#endif
--- 100,104 ----
#include <string.h> /* bzero */
#endif
! #if defined(linux) || defined(__sun) || defined(__hpux) || defined(_AIX)
#include <aio.h>
#endif
***************
*** 1519,1523 ****
! #ifndef linux
/***********************************************************************
* This function will check that async io was successful.
--- 1519,1523 ----
! #if !defined(linux) && !defined(__sun) && !defined(__hpux) && !defined(_AIX)
/***********************************************************************
* This function will check that async io was successful.
***************
*** 1585,1589 ****
--- 1585,1592 ----
(aiocbp->aio_sigevent.sigev_notify == SIGEV_SIGNAL ? "signal" :
aiocbp->aio_sigevent.sigev_notify == SIGEV_NONE ? "none" :
+ #ifdef SIGEV_CALLBACK
aiocbp->aio_sigevent.sigev_notify == SIGEV_CALLBACK ? "callback" :
+ #endif
+ aiocbp->aio_sigevent.sigev_notify == SIGEV_THREAD ? "thread" :
"unknown") );
return -ret;
***************
*** 1684,1688 ****
--- 1687,1694 ----
(aiocbp->aio_sigevent.sigev_notify == SIGEV_SIGNAL ? "signal" :
aiocbp->aio_sigevent.sigev_notify == SIGEV_NONE ? "none" :
+ #ifdef SIGEV_CALLBACK
aiocbp->aio_sigevent.sigev_notify == SIGEV_CALLBACK ? "callback" :
+ #endif
+ aiocbp->aio_sigevent.sigev_notify == SIGEV_THREAD ? "thread" :
"unknown") );
***************
*** 1701,1705 ****
(aiocbp->aio_sigevent.sigev_notify == SIGEV_SIGNAL ? "signal" :
aiocbp->aio_sigevent.sigev_notify == SIGEV_NONE ? "none" :
! aiocbp->aio_sigevent.sigev_notify == SIGEV_CALLBACK ? "callback" :
"unknown") );
return -errno;
--- 1707,1714 ----
(aiocbp->aio_sigevent.sigev_notify == SIGEV_SIGNAL ? "signal" :
aiocbp->aio_sigevent.sigev_notify == SIGEV_NONE ? "none" :
! #ifdef SIGEV_CALLBACK
! aiocbp->aio_sigevent.sigev_notify == SIGEV_CALLBACK ? "callback" :
! #endif
! aiocbp->aio_sigevent.sigev_notify == SIGEV_THREAD ? "thread" :
"unknown") );
return -errno;
Index: tst_sig.c
===================================================================
RCS file: /cvsroot/ltp/ltp/lib/tst_sig.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** tst_sig.c 19 May 2004 20:44:50 -0000 1.9
--- tst_sig.c 4 Jan 2005 21:00:35 -0000 1.10
***************
*** 71,74 ****
--- 71,75 ----
#include <string.h>
#include <signal.h>
+ #include <unistd.h>
#include "test.h"
***************
*** 100,103 ****
--- 101,107 ----
char mesg[MAXMESG]; /* message buffer for tst_res */
int sig;
+ #ifdef _SC_SIGRT_MIN
+ long sigrtmin, sigrtmax;
+ #endif
/*
***************
*** 111,114 ****
--- 115,123 ----
}
+ #ifdef _SC_SIGRT_MIN
+ sigrtmin = sysconf(_SC_SIGRT_MIN);
+ sigrtmax = sysconf(_SC_SIGRT_MAX);
+ #endif
+
/*
* now loop through all signals and set the handlers
***************
*** 123,130 ****
--- 132,145 ----
*/
+ #ifdef _SC_SIGRT_MIN
+ if (sig >= sigrtmin && sig <= sigrtmax)
+ continue;
+ #endif
+
switch (sig) {
case SIGKILL:
case SIGSTOP:
case SIGCONT:
+ #if !defined(_SC_SIGRT_MIN) && defined(__SIGRTMIN) && defined(__SIGRTMAX)
/* Ignore all real-time signals */
case __SIGRTMIN:
***************
*** 164,167 ****
--- 179,183 ----
case __SIGRTMAX-1:
case __SIGRTMAX:
+ #endif
#ifdef CRAY
case SIGINFO:
***************
*** 190,194 ****
case SIGPTRESCHED:
#endif /* SIGPTRESCHED */
!
break;
--- 206,221 ----
case SIGPTRESCHED:
#endif /* SIGPTRESCHED */
! #ifdef _SIGRESERVE
! case _SIGRESERVE:
! #endif
! #ifdef _SIGDIL
! case _SIGDIL:
! #endif
! #ifdef _SIGCANCEL
! case _SIGCANCEL:
! #endif
! #ifdef _SIGGFAULT
! case _SIGGFAULT:
! #endif
break;
Index: tst_tmpdir.c
===================================================================
RCS file: /cvsroot/ltp/ltp/lib/tst_tmpdir.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** tst_tmpdir.c 25 Aug 2004 05:07:02 -0000 1.9
--- tst_tmpdir.c 4 Jan 2005 21:00:35 -0000 1.10
***************
*** 174,178 ****
* Make the template name, then the directory
*/
! if (tfd = mkstemp(template) == -1)
tst_brkm(TBROK, tmpdir_cleanup,
"%s: mkstemp(%s) failed; errno = %d: %s",
--- 174,178 ----
* Make the template name, then the directory
*/
! if ((tfd = mkstemp(template)) == -1)
tst_brkm(TBROK, tmpdir_cleanup,
"%s: mkstemp(%s) failed; errno = %d: %s",
Index: write_log.c
===================================================================
RCS file: /cvsroot/ltp/ltp/lib/write_log.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** write_log.c 18 Jun 2003 17:44:03 -0000 1.5
--- write_log.c 4 Jan 2005 21:00:35 -0000 1.6
***************
*** 75,79 ****
#ifndef BSIZE
! #ifdef linux
#define BSIZE DEV_BSIZE
#else
--- 75,79 ----
#ifndef BSIZE
! #ifdef DEV_BSIZE
#define BSIZE DEV_BSIZE
#else
Index: tst_kvercmp.c
===================================================================
RCS file: /cvsroot/ltp/ltp/lib/tst_kvercmp.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** tst_kvercmp.c 13 Mar 2003 19:00:13 -0000 1.3
--- tst_kvercmp.c 4 Jan 2005 21:00:35 -0000 1.4
***************
*** 42,46 ****
char *kver;
char *r1, *r2, *r3;
!
uname(&uval);
kver = uval.release;
--- 42,47 ----
char *kver;
char *r1, *r2, *r3;
! extern char *strsep(); /* shut up some compilers */
!
uname(&uval);
kver = uval.release;
Index: parse_opts.c
===================================================================
RCS file: /cvsroot/ltp/ltp/lib/parse_opts.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** parse_opts.c 5 Jan 2004 21:12:51 -0000 1.6
--- parse_opts.c 4 Jan 2005 21:00:29 -0000 1.7
***************
*** 681,685 ****
static int stop_time = 0; /* stop time in rtc or usecs */
static int delay; /* delay in clocks or usecs */
! int hz=0; /* clocks per second or usecs per second */
int ct, end; /* current time, end delay time */
int keepgoing=0; /* used to determine return value */
--- 681,685 ----
static int stop_time = 0; /* stop time in rtc or usecs */
static int delay; /* delay in clocks or usecs */
! int hertz=0; /* clocks per second or usecs per second */
int ct, end; /* current time, end delay time */
int keepgoing=0; /* used to determine return value */
***************
*** 694,698 ****
first_time=0;
if ( STD_LOOP_DELAY || STD_LOOP_DURATION ) {
! hz = get_timepersec();
}
--- 694,698 ----
first_time=0;
if ( STD_LOOP_DELAY || STD_LOOP_DURATION ) {
! hertz = get_timepersec();
}
***************
*** 704,708 ****
if ( STD_LOOP_DURATION) {
ct=get_current_time();
! stop_time=(int)((float)hz * STD_LOOP_DURATION) + ct;
}
--- 704,708 ----
if ( STD_LOOP_DURATION) {
ct=get_current_time();
! stop_time=(int)((float)hertz * STD_LOOP_DURATION) + ct;
}
***************
*** 712,716 ****
*/
if ( STD_LOOP_DELAY ) {
! delay=(int)((float)hz * STD_LOOP_DELAY);
}
--- 712,716 ----
*/
if ( STD_LOOP_DELAY ) {
! delay=(int)((float)hertz * STD_LOOP_DELAY);
}
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Ltp-cvs mailing list
Ltp-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic