tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: USE_FEATURES=nbcompat and cvsdiff2patch



Le 23/05/15 14:37, Kamil Rytarowski a écrit :
> Please use
> #include <nbcompat/stdio.h>
> #include <nbcompat/string.h>
> #include <nbcompat/stdlib.h>
> #include <nbcompat/err.h>
> 

Okay, so nbcompat.h pulls in everything. I see your point.

Looking at the example given in mk/features/features-vars.mk, 
this seems to bring in enough to build:
> richard@dev64:/home/richard/src/pkgsrc/devel/cvsdiff2patch$ cvs diff files/cvsdiff2patch.c |cvsdiff2patch 
> Cvsdiff2patch (c) 2003 Research Engineering Development
> --- files/cvsdiff2patch.c
> +++ files/cvsdiff2patch.c
> @@ -32,11 +32,19 @@
>  /*
>   * Convert crappy CVS diffs into something that patch(1) understands.
>   */
> -
> +#ifdef HAVE_NBCOMPAT_H
> +#include <nbcompat/config.h>	/* needed for the other headers */
> +#include <nbcompat/cdefs.h>	/* needed for the other headers */
> +#include <nbcompat/stdio.h>
> +#include <nbcompat/string.h>
> +#include <nbcompat/stdlib.h>
> +#include <nbcompat/err.h>
> +#else
>  #include <stdio.h>
>  #include <string.h>
>  #include <stdlib.h>
>  #include <err.h>
> +#endif
>  
>  char *	xstrdup(const char *str);
>  int	fileline(const char *line, int ch);

cheers
-- 
Richard PALO



Home | Main Index | Thread Index | Old Index