Add libg2c (the new name for libf2c). Builds fine, though has some nits
on LP64 that need working out.
This commit is contained in:
parent
d2a09c18be
commit
00a8c57db1
118
gnu/lib/libg2c/Makefile
Normal file
118
gnu/lib/libg2c/Makefile
Normal file
@ -0,0 +1,118 @@
|
||||
# $NetBSD: Makefile,v 1.1 1998/08/18 17:25:32 tv Exp $
|
||||
|
||||
LIB= g2c
|
||||
|
||||
F77SRCS= F77_aloc.c Version.c main.c s_rnge.c abort_.c getarg_.c \
|
||||
iargc_.c getenv_.c signal_.c s_stop.c s_paus.c system_.c \
|
||||
cabs.c derf_.c derfc_.c erf_.c erfc_.c sig_die.c exit_.c \
|
||||
setarg.c setsig.c pow_ci.c pow_dd.c pow_di.c pow_hh.c \
|
||||
pow_ii.c pow_ri.c pow_zi.c pow_zz.c pow_qq.c c_abs.c \
|
||||
c_cos.c c_div.c c_exp.c c_log.c c_sin.c c_sqrt.c z_abs.c \
|
||||
z_cos.c z_div.c z_exp.c z_log.c z_sin.c z_sqrt.c r_abs.c \
|
||||
r_acos.c r_asin.c r_atan.c r_atn2.c r_cnjg.c r_cos.c \
|
||||
r_cosh.c r_dim.c r_exp.c r_imag.c r_int.c r_lg10.c r_log.c \
|
||||
r_mod.c r_nint.c r_sign.c r_sin.c r_sinh.c r_sqrt.c \
|
||||
r_tan.c r_tanh.c d_abs.c d_acos.c d_asin.c d_atan.c \
|
||||
d_atn2.c d_cnjg.c d_cos.c d_cosh.c d_dim.c d_exp.c \
|
||||
d_imag.c d_int.c d_lg10.c d_log.c d_mod.c d_nint.c \
|
||||
d_prod.c d_sign.c d_sin.c d_sinh.c d_sqrt.c d_tan.c \
|
||||
d_tanh.c i_abs.c i_dim.c i_dnnt.c i_indx.c i_len.c i_mod.c \
|
||||
i_nint.c i_sign.c h_abs.c h_dim.c h_dnnt.c h_indx.c \
|
||||
h_len.c h_mod.c h_nint.c h_sign.c l_ge.c l_gt.c l_le.c \
|
||||
l_lt.c hl_ge.c hl_gt.c hl_le.c hl_lt.c ef1asc_.c ef1cmc_.c \
|
||||
s_cat.c s_cmp.c s_copy.c lbitbits.c lbitshft.c qbitbits.c \
|
||||
qbitshft.c
|
||||
|
||||
I77SRCS= Version.c backspace.c close.c dfe.c dolio.c due.c \
|
||||
endfile.c err.c fmt.c fmtlib.c iio.c ilnw.c inquire.c \
|
||||
lread.c lwrite.c open.c rdfmt.c rewind.c rsfe.c rsli.c \
|
||||
rsne.c sfe.c sue.c typesize.c uio.c util.c wref.c wrtfmt.c \
|
||||
wsfe.c wsle.c wsne.c xwsne.c ftell_.c
|
||||
|
||||
U77SRCS= Version.c gerror_.c perror_.c ierrno_.c itime_.c time_.c \
|
||||
unlink_.c fnum_.c getpid_.c getuid_.c getgid_.c kill_.c \
|
||||
rand_.c srand_.c irand_.c sleep_.c idate_.c ctime_.c \
|
||||
etime_.c dtime_.c isatty_.c ltime_.c fstat_.c stat_.c \
|
||||
lstat_.c access_.c link_.c getlog_.c ttynam_.c getcwd_.c \
|
||||
symlnk_.c vxttime_.c vxtidate_.c gmtime_.c fdate_.c \
|
||||
secnds_.c bes.c dbes.c chdir_.c chmod_.c lnblnk_.c \
|
||||
hostnm_.c rename_.c fgetc_.c fputc_.c umask_.c \
|
||||
sys_clock_.c date_.c second_.c flush1_.c mclock_.c \
|
||||
alarm_.c datetime_.c
|
||||
|
||||
E77OBJS= abort.o derf.o derfc.o ef1asc.o ef1cmc.o erf.o erfc.o \
|
||||
exit.o getarg.o getenv.o iargc.o signal.o system.o flush.o \
|
||||
ftell.o fseek.o access.o besj0.o besj1.o besjn.o besy0.o \
|
||||
besy1.o besyn.o chdir.o chmod.o ctime.o date.o dbesj0.o \
|
||||
dbesj1.o dbesjn.o dbesy0.o dbesy1.o dbesyn.o dtime.o \
|
||||
etime.o fdate.o fgetc.o fget.o flush1.o fnum.o fputc.o \
|
||||
fput.o fstat.o gerror.o getcwd.o getgid.o getlog.o \
|
||||
getpid.o getuid.o gmtime.o hostnm.o idate.o ierrno.o \
|
||||
irand.o isatty.o itime.o kill.o link.o lnblnk.o lstat.o \
|
||||
ltime.o mclock.o perror.o rand.o rename.o secnds.o \
|
||||
second.o sleep.o srand.o stat.o symlnk.o time.o ttynam.o \
|
||||
umask.o unlink.o vxtidt.o vxttim.o alarm.o
|
||||
|
||||
LIBF77SRCS= ${F77SRCS:.c=_F.c} ${I77SRCS:.c=_I.c} ${U77SRCS:.c=_U.c}
|
||||
|
||||
SRCS+= ${LIBF77SRCS}
|
||||
OBJS+= ${E77OBJS}
|
||||
SOBJS+= ${E77OBJS:.o=.so}
|
||||
POBJS+= ${E77OBJS:.o=.po}
|
||||
CLEANFILES+= ${LIBF77SRCS}
|
||||
DPSRCS+= g2c.h
|
||||
|
||||
NOLINT=
|
||||
|
||||
CPPFLAGS+= -I. -I${.CURDIR} -I${ARCH} -I${ARCH}/${MACHINE_ARCH} \
|
||||
-I${DIST}/libf2c -I${DIST}/libf2c/libF77 \
|
||||
-I${DIST}/libf2c/libI77 -I${DIST}/libf2c/libU77 \
|
||||
-I${DIST}/gcc/config -I${DIST}/gcc/f -I${DIST}/gcc \
|
||||
-DNETBSD_NATIVE -DHAVE_CONFIG_H=1 -DSTDC_HEADERS=1 \
|
||||
-DRETSIGTYPE=void -DIEEE_drem=1 -DSkip_f2c_Undefs=1 \
|
||||
-DHAVE_TEMPNAM=1 -DNO_EOF_CHAR_CHECK=1
|
||||
HOST_CPPFLAGS+= ${CPPFLAGS}
|
||||
|
||||
CLEANFILES+= g2c.h g2ctypes.sed
|
||||
|
||||
# XXX may need a better way to do this
|
||||
MAKE_SYMLINK?= ln -sf
|
||||
|
||||
DIST= ${.CURDIR}/../../dist
|
||||
ARCH= ${.CURDIR}/../../usr.bin/egcs/arch
|
||||
|
||||
.PATH: ${DIST}/libf2c ${DIST}/gcc/f
|
||||
|
||||
g2ctypes.sed: g2ctypes.c
|
||||
${CC} ${CPPFLAGS} -E ${.CURDIR}/g2ctypes.c | grep 'F2C_' >g2ctypes.sed
|
||||
|
||||
g2c.h: g2c.hin g2ctypes.sed
|
||||
sed -f g2ctypes.sed <${.ALLSRC:M*.hin} >$@
|
||||
|
||||
.for file in ${F77SRCS}
|
||||
${file:.c=_F.c}: ${DIST}/libf2c/libF77/${file}
|
||||
${MAKE_SYMLINK} $> $@
|
||||
.endfor
|
||||
|
||||
.for file in ${I77SRCS}
|
||||
${file:.c=_I.c}: ${DIST}/libf2c/libI77/${file}
|
||||
${MAKE_SYMLINK} $> $@
|
||||
.endfor
|
||||
|
||||
.for file in ${U77SRCS}
|
||||
${file:.c=_U.c}: ${DIST}/libf2c/libU77/${file}
|
||||
${MAKE_SYMLINK} $> $@
|
||||
.endfor
|
||||
|
||||
${E77OBJS}: f2cext.c
|
||||
${COMPILE.c} -DL$* -o $@ ${.ALLSRC:M*.c}
|
||||
|
||||
${E77OBJS:.o=.so}: f2cext.c
|
||||
${COMPILE.c} ${CPICFLAGS} -DL$* -o $@ ${.ALLSRC:M*.c}
|
||||
|
||||
${E77OBJS:.o=.po}: f2cext.c
|
||||
${COMPILE.c} -pg -DL$* -o $@ ${.ALLSRC:M*.c}
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
||||
${OBJS}: g2c.h
|
109
gnu/lib/libg2c/config.h
Normal file
109
gnu/lib/libg2c/config.h
Normal file
@ -0,0 +1,109 @@
|
||||
/* $NetBSD: config.h,v 1.1 1998/08/18 17:25:32 tv Exp $ */
|
||||
|
||||
/* config.h. Generated automatically by configure. */
|
||||
/* config.hin. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define if your struct stat has st_blksize. */
|
||||
#define HAVE_ST_BLKSIZE 1
|
||||
|
||||
/* Define if your struct stat has st_blocks. */
|
||||
#define HAVE_ST_BLOCKS 1
|
||||
|
||||
/* Define if your struct stat has st_rdev. */
|
||||
#define HAVE_ST_RDEV 1
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef mode_t */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef pid_t */
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
/* #define STDC_HEADERS 1 */
|
||||
|
||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define if your <sys/time.h> declares struct tm. */
|
||||
/* #undef TM_IN_SYS_TIME */
|
||||
|
||||
/* Define as the path of the `chmod' program. */
|
||||
#define CHMOD_PATH "/bin/chmod"
|
||||
|
||||
/* Define if you have the alarm function. */
|
||||
#define HAVE_ALARM 1
|
||||
|
||||
/* Define if you have the clock function. */
|
||||
#define HAVE_CLOCK 1
|
||||
|
||||
/* Define if you have the getcwd function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define if you have the getgid function. */
|
||||
#define HAVE_GETGID 1
|
||||
|
||||
/* Define if you have the gethostname function. */
|
||||
#define HAVE_GETHOSTNAME 1
|
||||
|
||||
/* Define if you have the getlogin function. */
|
||||
#define HAVE_GETLOGIN 1
|
||||
|
||||
/* Define if you have the getrusage function. */
|
||||
#define HAVE_GETRUSAGE 1
|
||||
|
||||
/* Define if you have the gettimeofday function. */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define if you have the getuid function. */
|
||||
#define HAVE_GETUID 1
|
||||
|
||||
/* Define if you have the getwd function. */
|
||||
#define HAVE_GETWD 1
|
||||
|
||||
/* Define if you have the kill function. */
|
||||
#define HAVE_KILL 1
|
||||
|
||||
/* Define if you have the link function. */
|
||||
#define HAVE_LINK 1
|
||||
|
||||
/* Define if you have the lstat function. */
|
||||
#define HAVE_LSTAT 1
|
||||
|
||||
/* Define if you have the strerror function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define if you have the symlink function. */
|
||||
#define HAVE_SYMLINK 1
|
||||
|
||||
/* Define if you have the times function. */
|
||||
#define HAVE_TIMES 1
|
||||
|
||||
/* Define if you have the ttyname function. */
|
||||
#define HAVE_TTYNAME 1
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
|
||||
/* Define if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define if you have the <sys/times.h> header file. */
|
||||
#define HAVE_SYS_TIMES_H 1
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
26
gnu/lib/libg2c/g2ctypes.c
Normal file
26
gnu/lib/libg2c/g2ctypes.c
Normal file
@ -0,0 +1,26 @@
|
||||
/* $NetBSD: g2ctypes.c,v 1.1 1998/08/18 17:25:33 tv Exp $ */
|
||||
|
||||
/*
|
||||
* Not actually C; just fed through the preprocessor.
|
||||
*/
|
||||
|
||||
#define TREE_CODE 1
|
||||
#include "proj.h"
|
||||
#define FFECOM_DETERMINE_TYPES 1
|
||||
#include "com.h"
|
||||
|
||||
#if FFECOM_f2cINTEGER == FFECOM_f2ccodeLONG
|
||||
s/@F2C_INTEGER@/long int/g
|
||||
#elif FFECOM_f2cINTEGER == FFECOM_f2ccodeINT
|
||||
s/@F2C_INTEGER@/int/g
|
||||
#else
|
||||
# error "Cannot find a suitable type for F2C_INTEGER"
|
||||
#endif
|
||||
|
||||
#if FFECOM_f2cLONGINT == FFECOM_f2ccodeLONG
|
||||
s/@F2C_LONGINT@/long int/g
|
||||
#elif FFECOM_f2cLONGINT == FFECOM_f2ccodeLONGLONG
|
||||
s/@F2C_LONGINT@/long long int/g
|
||||
#else
|
||||
# error "Cannot find a suitable type for F2C_LONGINT"
|
||||
#endif
|
2
gnu/lib/libg2c/shlib_version
Normal file
2
gnu/lib/libg2c/shlib_version
Normal file
@ -0,0 +1,2 @@
|
||||
major=0
|
||||
minor=0
|
Loading…
Reference in New Issue
Block a user