1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-24 09:25:01 +00:00
freebsd-ports/lang/f2c/files/patch-libf2c_MAIN.c
Thierry Thomas 7c4e7be942 - Upgrade to 20200916, changelog at <https://www.netlib.org/f2c/changes>;
- Directly fetch from upstream;

- Define the license.
2020-12-06 15:04:38 +00:00

22 lines
498 B
C

--- libf2c/MAIN.c.orig 2020-12-05 22:19:12 UTC
+++ libf2c/MAIN.c
@@ -0,0 +1,18 @@
+/*
+ Add a pseudo entry point for cases where the main FOTRAN program is missing
+ e.g. ports/cad/tochnog.
+
+ Credit: adapted from Sergio Gelato <gelato (at) sissa.it> on Usenet.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/cdefs.h>
+
+__weak_reference(missing_MAIN__,MAIN__);
+
+void missing_MAIN__ (void)
+{
+ fprintf(stderr, "The Fortran main program is missing.\n");
+ abort();
+}