xref: /csrg-svn/usr.bin/f77/libF77/Usef.c (revision 40227)
124102Sjerry /*
224102Sjerry  * Copyright (c) 1980 Regents of the University of California.
324102Sjerry  * All rights reserved.  The Berkeley software License Agreement
424102Sjerry  * specifies the terms and conditions for redistribution.
524102Sjerry  *
6*40227Sdonn  *	@(#)Usef.c	1.4	02/25/90
724102Sjerry  */
824102Sjerry 
924102Sjerry /*		returns '-f' if need to use -f to bypass C bug		*/
1024102Sjerry 
1124102Sjerry static char *needs_f[] = {
1224102Sjerry 	"besj0_", "besj1_", "besjn_", "besy0_", "besy1_", "besyn_",
1324102Sjerry 	"c_abs", "erf_", "erfc_", "r_abs", "r_acos", "r_asin",
1424102Sjerry 	"r_atan", "r_atn2", "r_cos", "r_cosh", "r_exp", "r_imag",
1524102Sjerry 	"r_int", "r_lg10", "r_log", "r_sign", "r_sin",
1624102Sjerry 	"r_sinh", "r_sqrt", "r_tan", "r_tanh", "rand_", "random_",
1724102Sjerry 	0,
1824102Sjerry 	};
1924102Sjerry 
2024102Sjerry main(argc, argv)
2124102Sjerry int argc;
2224102Sjerry char **argv;
2324102Sjerry {
2424102Sjerry 	char **ptr;
25*40227Sdonn 	float f;
2624102Sjerry 
27*40227Sdonn 	if (sizeof (f + f) != sizeof f)
28*40227Sdonn 	{
29*40227Sdonn 		argv++;
30*40227Sdonn 		ptr = needs_f;
31*40227Sdonn 		while( *ptr != 0 ) {
32*40227Sdonn 			if( strcmp( *ptr++, *argv ) == 0 )
33*40227Sdonn 			{
34*40227Sdonn 				printf("-f");
35*40227Sdonn 				exit(0);
36*40227Sdonn 			}
3724102Sjerry 		}
3824102Sjerry 	}
3924102Sjerry 	printf(" ");
4024102Sjerry 	exit(0);
4124102Sjerry }
42