[Mew-dist 16630] Re: b109

Takahiro Kambe taca at example.com
2001年 2月 27日 (火) 11:15:09 JST


<20010226.012005.125127195.hal at example.com>
<20010227.104611.50022000.kazu at example.com>
X-Mailer: Mew version 1.94.2 on Emacs 20.7 / Mule 4.0 (HANANOEN)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit

In message <20010227.104611.50022000.kazu at example.com>
on Tue, 27 Feb 2001 10:46:22 +0900,
Kazu Yamamoto (山本和彦) <kazu at example.com> wrote:
> > どのように解決するのがいいのでしょうか?
> 
> 関数名を変えておきました。
とのことですが、パッチを作ってたのを忘れてました。出すだけ出しときます。

--
神戸 隆博(かんべ たかひろ)		at 仕事場 

Index: bin/config.h.in
--- bin/config.h.in.orig	Wed Nov 29 19:26:34 2000
+++ bin/config.h.in	Tue Feb 27 11:02:33 2001
@@ -57,6 +57,9 @@
 /* Define if you have the poll function.  */
 #undef HAVE_POLL
 
+/* Define if you have the getprogname function.  */
+#undef HAVE_GETPROGNAME
+
 /* Define if you have the setmode function.  */
 #undef HAVE_SETMODE
 
Index: bin/configure.in
--- bin/configure.in.orig	Wed Nov 29 19:26:34 2000
+++ bin/configure.in	Tue Feb 27 11:02:33 2001
@@ -13,7 +13,7 @@
 AC_HEADER_DIRENT
 AC_CHECK_HEADERS(dir.h unistd.h pwd.h fcntl.h io.h)
 AC_CHECK_LIB(z, main)
-AC_CHECK_FUNCS(strncasecmp strnicmp fork vfork getpwuid usleep Sleep setmode _setmode chdir _chdir2 poll)
+AC_CHECK_FUNCS(strncasecmp strnicmp fork vfork getpwuid usleep Sleep setmode _setmode chdir _chdir2 poll getprogname)
 
 if test "$ac_cv_prog_CC" = "gcc"; then
   CFLAGS="$CFLAGS -Wall"
Index: bin/configure
--- bin/configure.orig	Wed Nov 29 19:26:34 2000
+++ bin/configure	Tue Feb 27 11:02:33 2001
@@ -1450,7 +1450,7 @@
   echo "$ac_t""no" 1>&6
 fi
 
-for ac_func in strncasecmp strnicmp fork vfork getpwuid usleep Sleep setmode _setmode chdir _chdir2 poll
+for ac_func in strncasecmp strnicmp fork vfork getpwuid usleep Sleep setmode _setmode chdir _chdir2 poll getprogname
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 echo "configure:1457: checking for $ac_func" >&5
Index: bin/mew.h
--- bin/mew.h.orig	Wed Nov 29 19:26:34 2000
+++ bin/mew.h	Tue Feb 27 11:03:03 2001
@@ -116,7 +116,9 @@
 #define public  extern
 #define private static
 
+#ifndef HAVE_GETPROGNAME
 public char *getprogname(char *);
+#endif
 public void warning(const char *, ...);
 public void warn_exit(const char *, ...);
 public int search_string(char *, char *, int);
@@ -124,7 +126,7 @@
 public int pattern_match(void);
 public int Getopt(int, char **, const char *);
 	
-extern char *warn_prog;
+extern const char *warn_prog;
 extern int Optind;
 extern char *Optarg;
 
Index: bin/mewencode.c
--- bin/mewencode.c.orig	Wed Dec 20 15:15:08 2000
+++ bin/mewencode.c	Tue Feb 27 11:02:33 2001
@@ -987,7 +987,11 @@
 	int  length = LINELEN;	/* -l num */
 	int  text   = NO;	/* -t */
 	int  use_file_name = NO;
+#ifdef HAVE_GETPROGNAME
+	const char *progname = getprogname();
+#else
 	char *progname = getprogname(argv[0]);
+#endif
 
 	warn_prog = progname;
 
Index: bin/mewls.c
--- bin/mewls.c.orig	Thu Dec 28 17:15:38 2000
+++ bin/mewls.c	Tue Feb 27 11:02:33 2001
@@ -873,8 +873,12 @@
 	FILE *(*func_getfile)(char **, char **);
 	FILE *fp;
 	char *filename, *foldername, *fields = NULL, *pattern = NULL;
-	char *progname = getprogname(argv[0]);
 	char *fld_rng;
+#ifdef HAVE_GETPROGNAME
+	const char *progname = getprogname();
+#else
+	char *progname = getprogname(argv[0]);
+#endif
 
 	warn_prog = progname;
 	STRDUP(Mail_home, MAILHOME);
Index: bin/pattern.c
--- bin/pattern.c.orig	Thu Dec 28 15:51:09 2000
+++ bin/pattern.c	Tue Feb 27 11:02:33 2001
@@ -626,7 +626,11 @@
 int
 main(int argc, char *argv[])
 {
+#ifdef HAVE_GETPROGNAME
+	const char *progname = getprogname();
+#else
 	char *progname = getprogname(argv[0]);
+#endif
 	struct pat *top;
 
 	warn_prog = progname;
Index: bin/utils.c
--- bin/utils.c.orig	Fri Oct 20 11:40:44 2000
+++ bin/utils.c	Tue Feb 27 11:03:07 2001
@@ -16,8 +16,9 @@
 #include <ctype.h>
 #include <stdarg.h>
 
-char *warn_prog;
+const char *warn_prog;
 
+#ifndef HAVE_GETPROGNAME
 public char *
 getprogname(char *filename)
 {
@@ -33,6 +34,7 @@
 	}
 	return p;
 }
+#endif
 
 public void
 warning(const char *fmt, ...)



Mew-dist メーリングリストの案内