summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authortv <tv@NetBSD.org>1998-04-03 21:04:33 +0000
committertv <tv@NetBSD.org>1998-04-03 21:04:33 +0000
commit07b4e86106c295279c56738aaabaeb9caf8eb72a (patch)
tree180754baa668de110bce420141358750a7bd61c1 /gnu
parent676939e2347c55cfa6c5f89c8fe2c0ae330863c4 (diff)
Reengineering of libf2c as a single library (which g77 expects). Includes
a GNU-like "config.h" to make the librare correctly compatible with NetBSD.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/lib/libf2c/Makefile66
-rw-r--r--gnu/lib/libf2c/config.h169
-rw-r--r--gnu/lib/libf2c/shlib_version2
3 files changed, 237 insertions, 0 deletions
diff --git a/gnu/lib/libf2c/Makefile b/gnu/lib/libf2c/Makefile
new file mode 100644
index 00000000000..f7738facdf1
--- /dev/null
+++ b/gnu/lib/libf2c/Makefile
@@ -0,0 +1,66 @@
+# $NetBSD: Makefile,v 1.1 1998/04/03 21:04:33 tv Exp $
+
+LIB= f2c
+
+# libF77:
+FSRCS= 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 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
+
+# libI77:
+ISRCS= 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
+
+# libU77:
+USRCS= Version.c access_.c alarm_.c bes.c chdir_.c chmod_.c ctime_.c date_.c \
+ dbes.c dtime_.c etime_.c fdate_.c fgetc_.c flush1_.c fnum_.c fputc_.c \
+ fstat_.c gerror_.c getcwd_.c getgid_.c getlog_.c getpid_.c getuid_.c \
+ gmtime_.c hostnm_.c idate_.c ierrno_.c irand_.c isatty_.c itime_.c \
+ kill_.c link_.c lnblnk_.c lstat_.c ltime_.c mclock_.c perror_.c \
+ rand_.c rename_.c secnds_.c second_.c sleep_.c srand_.c stat_.c \
+ symlnk_.c sys_clock_.c time_.c ttynam_.c umask_.c unlink_.c \
+ vxtidate_.c vxttime_.c
+
+SRCS= ${FSRCS:S@^@libF77/@} ${ISRCS:S@^@libI77/@} ${USRCS:S@^@libU77/@} \
+ f2cext.c
+RT= ${.CURDIR}/../../dist/gcc/f/runtime
+
+CPPFLAGS+= -I. -I${.CURDIR} -I${RT}/libF77 -I${RT}/libI77 -I${RT}/libU77 \
+ -DNETBSD_NATIVE -DHAVE_CONFIG_H=1 -DMISSING_FILE_ELEMS=1 \
+ -DRETSIGTYPE=void -DIEEE_drem=1 -DNON_ANSI_RW_MODES=1 \
+ -DNO_EOF_CHAR_CHECK=1 -DSkip_f2c_Undefs=1 -DPad_UDread=1 \
+ -DWANT_LEAD_0=1
+
+.PATH: ${RT}
+
+${SRCS}: f2c.h
+f2c.h: f2c.h.in
+ sed -e 's/@F2C_INTEGER@/int/g' -e's/@F2C_LONGINT@/long/g' < ${.ALLSRC} > f2c.h
+CLEANFILES+= f2c.h
+
+${SRCS}: dirs
+dirs:
+ mkdir libF77 libI77 libU77 || true
+ @touch dirs
+
+.include <bsd.lib.mk>
+
+clean: __cleanlibdir
+.PHONY: __cleanlibdir
+__cleanlibdir:
+ rm -rf dirs libF77 libI77 libU77
diff --git a/gnu/lib/libf2c/config.h b/gnu/lib/libf2c/config.h
new file mode 100644
index 00000000000..846e8a2bebb
--- /dev/null
+++ b/gnu/lib/libf2c/config.h
@@ -0,0 +1,169 @@
+/* $NetBSD: config.h,v 1.1 1998/04/03 21:04:34 tv Exp $ */
+
+#ifndef __CONFIG_H__
+#define __CONFIG_H__
+
+/*
+ * Manually generated from config.h.in for use in a native libf2c compile.
+ */
+
+#ifdef NETBSD_NATIVE
+
+/* 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. */
+#define TM_IN_SYS_TIME 1
+
+/* Define as the path of the `chmod' program. */
+/*#undef CHMOD_PATH*/
+
+/* 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 gethostname function. */
+#define HAVE_GETHOSTNAME 1
+
+/* Define if you have the getrusage function. */
+#define HAVE_GETRUSAGE 1
+
+/* Define if you have the getwd function. */
+#define HAVE_GETWD 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 <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/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/*
+ * Tell f2cext.c to build all extension calls into one object file.
+ */
+
+#define Labort
+#define Lderf
+#define Lderfc
+#define Lef1asc
+#define Lef1cmc
+#define Lerf
+#define Lerfc
+#define Lexit
+#define Lgetarg
+#define Lgetenv
+#define Liargc
+#define Lsignal
+#define Lsystem
+#define Lflush
+#define Lftell
+#define Lfseek
+#define Laccess
+#define Lbesj0
+#define Lbesj1
+#define Lbesjn
+#define Lbesy0
+#define Lbesy1
+#define Lbesyn
+#define Lchdir
+#define Lchmod
+#define Lctime
+#define Ldate
+#define Ldbesj0
+#define Ldbesj1
+#define Ldbesjn
+#define Ldbesy0
+#define Ldbesy1
+#define Ldbesyn
+#define Ldtime
+#define Letime
+#define Lfdate
+#define Lfgetc
+#define Lfget
+#define Lflush1
+#define Lfnum
+#define Lfputc
+#define Lfput
+#define Lfstat
+#define Lgerror
+#define Lgetcwd
+#define Lgetgid
+#define Lgetlog
+#define Lgetpid
+#define Lgetuid
+#define Lgmtime
+#define Lhostnm
+#define Lidate
+#define Lierrno
+#define Lirand
+#define Lisatty
+#define Litime
+#define Lkill
+#define Llink
+#define Llnblnk
+#define Llstat
+#define Lltime
+#define Lmclock
+#define Lperror
+#define Lrand
+#define Lrename
+#define Lsecnds
+#define Lsecond
+#define Lsleep
+#define Lsrand
+#define Lstat
+#define Lsymlnk
+#define Lsclock
+#define Ltime
+#define Lttynam
+#define Lumask
+#define Lunlink
+#define Lvxtidt
+#define Lvxttim
+#define Lalarm
+
+#endif /* NETBSD_NATIVE */
+#endif /* !__CONFIG_H__ */
diff --git a/gnu/lib/libf2c/shlib_version b/gnu/lib/libf2c/shlib_version
new file mode 100644
index 00000000000..97c9f92d6b8
--- /dev/null
+++ b/gnu/lib/libf2c/shlib_version
@@ -0,0 +1,2 @@
+major=0
+minor=0