Parcourir la source

Fix a small number of -Wmissing-prototypes compiler warnings in sincos().

- Add missing prototypes to openlibm.h for sincos() and sincosf().
- Mark the internal kernel functions static.
Ed Schouten il y a 10 ans
Parent
commit
9fdc4f9d9e
3 fichiers modifiés avec 17 ajouts et 2 suppressions
  1. 15 0
      src/openlibm.h
  2. 1 1
      src/s_sincos.c
  3. 1 1
      src/s_sincosf.c

+ 15 - 0
src/openlibm.h

@@ -315,6 +315,11 @@ int	isnanf(float) __pure2;
 double	gamma_r(double, int *);
 double	lgamma_r(double, int *);
 
+/*
+ * Single sine/cosine function.
+ */
+void	sincos(double, double *, double *);
+
 /*
  * IEEE Test Vector
  */
@@ -411,6 +416,11 @@ float	ynf(int, float);
 float	gammaf_r(float, int *);
 float	lgammaf_r(float, int *);
 
+/*
+ * Single sine/cosine function.
+ */
+void	sincosf(float, float *, float *);
+
 /*
  * float version of IEEE Test Vector
  */
@@ -485,6 +495,11 @@ long double	truncl(long double);
 /* Reentrant version of lgammal. */
 #if __BSD_VISIBLE
 long double	lgammal_r(long double, int *);
+
+/*
+ * Single sine/cosine function.
+ */
+void	sincosl(long double, long double *, long double *);
 #endif	/* __BSD_VISIBLE */
 
 #if defined(__cplusplus)

+ 1 - 1
src/s_sincos.c

@@ -58,7 +58,7 @@ C4  = -2.75573143513906633035e-07, /* 0xBE927E4F, 0x809C52AD */
 C5  =  2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */
 C6  = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */
 
-DLLEXPORT void
+static void
 __kernel_sincos( double x, double y, int iy, double * k_s, double * k_c )
 {
     /* Inline calculation of sin/cos, as we can save

+ 1 - 1
src/s_sincosf.c

@@ -41,7 +41,7 @@ C1  =  0x155553e1053a42.0p-57,	/*  0.0416666233237390631894 */
 C2  = -0x16c087e80f1e27.0p-62,	/* -0.00138867637746099294692 */
 C3  =  0x199342e0ee5069.0p-68;	/*  0.0000243904487962774090654 */
 
-DLLEXPORT void
+static void
 __kernel_sincosdf( double x, float * s, float * c )
 {
 	double r, w, z, v;