pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/textproc/nbsed/files We use libnbcompat, so remove som...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/111db02ca440
branches:  trunk
changeset: 479807:111db02ca440
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Mon Aug 23 02:58:58 2004 +0000

description:
We use libnbcompat, so remove some standalone implemenations of some
needed functions, and vastly simplify the configure script.

diffstat:

 textproc/nbsed/files/Makefile.in   |    6 +-
 textproc/nbsed/files/config.h.in   |  108 ---------
 textproc/nbsed/files/configure     |  412 +++++++++---------------------------
 textproc/nbsed/files/configure.ac  |   95 +--------
 textproc/nbsed/files/fgetln.c      |   88 -------
 textproc/nbsed/files/setprogname.c |   68 ------
 6 files changed, 107 insertions(+), 670 deletions(-)

diffs (truncated from 878 to 300 lines):

diff -r 55b7d539c10a -r 111db02ca440 textproc/nbsed/files/Makefile.in
--- a/textproc/nbsed/files/Makefile.in  Mon Aug 23 00:30:21 2004 +0000
+++ b/textproc/nbsed/files/Makefile.in  Mon Aug 23 02:58:58 2004 +0000
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.2 2003/10/16 12:00:12 grant Exp $
+# $Id: Makefile.in,v 1.3 2004/08/23 02:58:58 jlam Exp $
 
 @SET_MAKE@
 SHELL = @SHELL@
@@ -42,8 +42,8 @@
 LINK= $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
 COMPILE= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS)
 
-SRCS= compile.c main.c misc.c process.c fgetln.c setprogname.c defs.h extern.h
-OBJS = compile.o main.o misc.o process.o fgetln.o setprogname.o
+SRCS= compile.c main.c misc.c process.c defs.h extern.h
+OBJS = compile.o main.o misc.o process.o
 
 DISTFILES= $(SRCS) AUTHORS COPYING INSTALL Makefile.in NEWS README aclocal.m4 \
 config.guess config.h.in config.sub configure configure.ac install-sh \
diff -r 55b7d539c10a -r 111db02ca440 textproc/nbsed/files/config.h.in
--- a/textproc/nbsed/files/config.h.in  Mon Aug 23 00:30:21 2004 +0000
+++ b/textproc/nbsed/files/config.h.in  Mon Aug 23 02:58:58 2004 +0000
@@ -1,11 +1,5 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
-/* Define to 1 if you have the `bcopy' function. */
-#undef HAVE_BCOPY
-
-/* Define to 1 if you have the `bzero' function. */
-#undef HAVE_BZERO
-
 /* Define to 1 if you have the <ctype.h> header file. */
 #undef HAVE_CTYPE_H
 
@@ -13,9 +7,6 @@
    don't. */
 #undef HAVE_DECL_STRERROR_R
 
-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
-#undef HAVE_DOPRNT
-
 /* Define to 1 if you have the <errno.h> header file. */
 #undef HAVE_ERRNO_H
 
@@ -43,9 +34,6 @@
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
-/* Define to 1 if you have the `memset' function. */
-#undef HAVE_MEMSET
-
 /* Define to 1 if you have the `regcomp' function. */
 #undef HAVE_REGCOMP
 
@@ -55,9 +43,6 @@
 /* Define to 1 if you have the <regex.h> header file. */
 #undef HAVE_REGEX_H
 
-/* Define to 1 if you have the `setlocale' function. */
-#undef HAVE_SETLOCALE
-
 /* Define to 1 if you have the `setprogname' function. */
 #undef HAVE_SETPROGNAME
 
@@ -106,9 +91,6 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
-/* Define to 1 if you have the `vprintf' function. */
-#undef HAVE_VPRINTF
-
 /* Define to the address where bug reports for this package should be sent. */
 #undef PACKAGE_BUGREPORT
 
@@ -141,93 +123,3 @@
 
 /* Define to `unsigned' if <sys/types.h> does not define. */
 #undef size_t
-
-
-
-#ifndef HAVE___ATTRIBUTE__
-# define __attribute__(x)
-#endif
-
-#ifdef HAVE_SYS_CDEFS_H
-#include <sys/cdefs.h>
-#endif
-
-#ifndef __IDSTRING
-# define __IDSTRING(name,string) \
-       static const char name[] __attribute__((__unused__)) = string
-#endif
-
-#ifndef  __RCSID
-# define __RCSID(_s)     __IDSTRING(rcsid,_s)
-#endif
-
-#ifndef __COPYRIGHT
-# define __COPYRIGHT(_s) __IDSTRING(copyright,_s)
-#endif
-
-#ifndef __P
-# if defined(__STDC__) || defined(__cplusplus)
-#  define __P(protos)     protos          /* full-blown ANSI C */
-# else
-#  define __P(protos)     ()              /* traditional C preprocessor */
-# endif
-#endif
-
-#ifndef __CONCAT
-#  if defined(__STDC__) || defined(__cplusplus)
-#  define __CONCAT(x,y)   x ## y
-# else
-#  define __CONCAT(x,y)   x/**/y
-# endif
-#endif
-
-#ifndef __BEGIN_DECLS
-# if defined(__cplusplus)
-#  define __BEGIN_DECLS   extern "C" {
-# else
-#  define __BEGIN_DECLS
-# endif
-#endif
-
-#ifndef __END_DECLS
-# if defined(__cplusplus)
-#  define __END_DECLS     };
-# else
-#  define __END_DECLS
-# endif
-#endif
-
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-
-#if defined(HAVE_MEMSET)
-#define MEMSET_BZERO(p,l)      memset((p), 0, (l))
-#else
-# if defined(HAVE_BZERO)
-#define MEMSET_BZERO(p,l)      bzero((p), (l))
-# else
-#error You need either memset or bzero
-# endif
-#endif
-
-#if defined(HAVE_MEMCPY)
-#define MEMCPY_BCOPY(d,s,l)    memcpy((d), (s), (l))
-#else
-# if defined(HAVE_BCOPY)
-#define MEMCPY_BCOPY(d,s,l)    bcopy((s), (d), (l))
-# else
-#error You need either memcpy or bcopy
-# endif
-#endif
-
-#ifndef DEFFILEMODE
-# define DEFFILEMODE     (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
-#endif
-
-#include <stdio.h>
-
-#ifndef HAVE_FGETLN
-char *fgetln(FILE *, size_t *);
-#endif
-
diff -r 55b7d539c10a -r 111db02ca440 textproc/nbsed/files/configure
--- a/textproc/nbsed/files/configure    Mon Aug 23 00:30:21 2004 +0000
+++ b/textproc/nbsed/files/configure    Mon Aug 23 02:58:58 2004 +0000
@@ -3765,6 +3765,108 @@
 done
 
 
+for ac_func in memcpy
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
 for ac_func in getprogname
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -4507,316 +4609,6 @@
 fi
 
 
-for ac_func in vprintf
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.



Home | Main Index | Thread Index | Old Index