[PATCH 06/20] Use "gmp-renamei.h" for renaming the internal routines

bodrato at mail.dm.unipi.it bodrato at mail.dm.unipi.it
Tue Mar 5 21:51:10 CET 2013


Ciao,

Il Lun, 4 Marzo 2013 7:41 pm, Richard Henderson ha scritto:

>  gmp-rename.h: gen-rename.c gen-rename.awk gmp.h
>  	$(COMPILE) -E $< | $(AWK) -f $(srcdir)/gen-rename.awk > $@ || (rm

> +gmp-renamei.h: gen-renamei.c gen-rename.awk gmp.h gmp-impl.h
> +	$(COMPILE) -E $< | $(AWK) -f $(srcdir)/gen-rename.awk > $@ || (rm

The use of $< in not portable, i fear.

http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/_0024_003c-in-Ordinary-Make-Rules.html

> +/* __GMP_INTERN handles symbols private to the GMP implementation.
> +   It comes in several variants to make the usage less arduous:
[...]
> +     __GMP_INTERN_DATA	- for declaring data variables
> +*/
[...]
> +#define __GMP_INTERN_DATA(TYPE, API_NAME)				\
> +  __GMP_INTERN_FULL(extern TYPE, API_NAME, , , ,			\
> +		    __GMP_GLUE(__GMP_ABI_PREFIX, API_NAME))
[...]
> +__GMP_INTERN (extern const mp_limb_t, __gmp_fib_table, []);
>  #define FIB_TABLE(n)  (__gmp_fib_table[(n)+1])
>
> -extern const mp_limb_t __gmp_oddfac_table[];
> -extern const mp_limb_t __gmp_odd2fac_table[];
> -extern const unsigned char __gmp_fac2cnt_table[];
> -extern const mp_limb_t __gmp_limbroots_table[];
> +__GMP_INTERN (extern const mp_limb_t, __gmp_oddfac_table, []);
> +__GMP_INTERN (extern const mp_limb_t, __gmp_odd2fac_table, []);
> +__GMP_INTERN (extern const unsigned char, __gmp_fac2cnt_table, []);
> +__GMP_INTERN (extern const mp_limb_t, __gmp_limbroots_table, []);

__GMP_INTERN_DATA should be used here, right?

Regards,
m

-- 
http://bodrato.it/papers/



More information about the gmp-devel mailing list