Permalink
Browse files

* Removing compiler warnings.

* Using getopt().
* Supporting RISC OS.
        Stefan Bellon <sbellon>
* Correct casting for Bzip2.
        Stefan Bellon <sbellon>
* Prepared os/riscos/{config.h,Makefile} since "sh" does not exist on
  RISC OS.
        Stefan Bellon <sbellon>
  • Loading branch information...
1 parent 1af1c15 commit 82dafed9e20dea67fd557c3b16630d7f2739df84 @kazu-yamamoto committed Feb 19, 2010
Showing with 321 additions and 60 deletions.
  1. +12 −0 CHANGES
  2. +3 −3 buffer.c
  3. +5 −0 config.h.in
  4. +142 −1 configure
  5. +1 −1 configure.in
  6. +56 −0 os/riscos/Makefile
  7. +31 −0 os/riscos/config.h
  8. +70 −52 pgpdump.c
  9. +1 −3 pgpdump.h
View
12 CHANGES
@@ -1,5 +1,17 @@
Change Log
+0.21 2004/01/13
+
+* Removing compiler warnings.
+* Using getopt().
+* Supporting RISC OS.
+ Stefan Bellon <sbellon>
+* Correct casting for Bzip2.
+ Stefan Bellon <sbellon>
+* Prepared os/riscos/{config.h,Makefile} since "sh" does not exist on
+ RISC OS.
+ Stefan Bellon <sbellon>
+
0.20 2003/12/08
* Catching up to 2440bis-09. Bzip2 was supported.
View
@@ -254,13 +254,13 @@ inflate_bzip2(byte *p, unsigned int max)
if (done == YES) return 0;
- bz.next_out = p;
+ bz.next_out = (char *)p;
bz.avail_out = max;
while (bz.avail_out != 0) {
if (bz.avail_in == 0) {
size = (*d_func2)(d_buf2, sizeof(d_buf2));
- bz.next_in = d_buf2;
+ bz.next_in = (char *)d_buf2;
bz.avail_in = size;
}
@@ -411,7 +411,7 @@ Compressed_Data_Packet(int len)
z.avail_out = sizeof(d_buf2);
#endif /* HAVE_LIBZ */
#ifdef HAVE_LIBBZ2
- bz.next_in = d_buf2;
+ bz.next_in = (char *)d_buf2;
bz.avail_in = AVAIL_COUNT;
bz.next_out = 0;
bz.avail_out = sizeof(d_buf2);
View
@@ -1,5 +1,7 @@
/* config.h.in. Generated automatically from configure.in by autoheader. */
+#undef PATH_SEPARATOR
+
/* Define if you don't have tm_zone but do have the external array
tzname. */
#undef HAVE_TZNAME
@@ -22,6 +24,9 @@
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
+/* Define if you have the <unixlib/local.h> header file. */
+#undef HAVE_UNIXLIB_LOCAL_H
+
/* Define if your struct tm has tm_zone. */
#undef HAVE_STRUCT_TM_TM_ZONE
View
143 configure
@@ -2869,7 +2869,6 @@ fi
done
-
for ac_header in sys/time.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -3011,6 +3010,148 @@ fi
done
+
+for ac_header in unixlib/local.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (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
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
if test "${ac_cv_header_time+set}" = set; then
View
@@ -12,8 +12,8 @@ dnl Checks for header files.
AC_CONFIG_HEADER(config.h)
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h)
-
AC_CHECK_HEADERS(sys/time.h)
+AC_CHECK_HEADERS(unixlib/local.h)
AC_HEADER_TIME
dnl Checks for typedefs, structures, and compiler characteristics.
View
@@ -0,0 +1,56 @@
+# Makefile for RISC OS pgpdump
+
+PGPDUMP=pgpdump-0/20
+ZLIB=^.zlib-1/1/4
+LIBBZIP2=^.bzip2-1/0/2
+
+CC=cc
+LINK=link
+MAKE=amu
+
+DEPEND=-depend !Depend
+CC_FLAGS=-Wp -throwback -Otime -I$(ZLIB),$(LIBBZIP2),Unix: -JUnix: -D__riscos__ -DHAVE_CONFIG_H
+LD_FLAGS=
+UNIXLIB=Unix:o.UnixLib
+
+PGPDUMP_OBJS=buffer.o \
+ keys.o \
+ packet.o \
+ pgpdump.o \
+ signature.o \
+ subfunc.o \
+ tagfuncs.o \
+ types.o \
+ uatfunc.o
+
+.INIT:
+ -cdir o
+
+## Rule Patterns ##
+
+.SUFFIXES: .c .o
+
+.c.o:
+ $(CC) $(CC_FLAGS) $(DEPEND) -c -o $@ $<
+
+# Static dependencies:
+
+pgpdump: $(PGPDUMP_OBJS) $(ZLIB).zlib $(LIBBZIP2).libbzip2
+ $(LINK) $(LD_FLAGS) -o pgpdump $(PGPDUMP_OBJS) $(ZLIB).zlib $(LIBBZIP2).libbzip2 $(UNIXLIB)
+ -squeeze pgpdump
+
+$(ZLIB).zlib:
+ dir $(ZLIB)
+ amu
+ dir ^.$(PGPDUMP)
+
+$(LIBBZIP2).libbzip2:
+ dir $(LIBBZIP2)
+ amu
+ dir ^.$(PGPDUMP)
+
+clean:
+ -ifthere pgpdump then wipe pgpdump ~CFR~V
+ -ifthere o.* then wipe o.* ~CFR~V
+
+# Dynamic dependencies:
View
@@ -0,0 +1,31 @@
+/* config.h.in. Generated automatically from configure.in by autoheader. */
+
+#undef PATH_SEPARATOR
+
+/* Define if you don't have tm_zone but do have the external array
+ tzname. */
+/* #undef HAVE_TZNAME */
+
+/* Define if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define if you have the z library (-lz). */
+#define HAVE_LIBZ 1
+
+/* Define if you have the z library (-lbz2). */
+#define HAVE_LIBBZ2 1
+
+/* Define if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Define if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define if you have the <unixlib/local.h> header file. */
+#define HAVE_UNIXLIB_LOCAL_H 1
+
+/* Define if your struct tm has tm_zone. */
+#define HAVE_STRUCT_TM_TM_ZONE 1
Oops, something went wrong.

0 comments on commit 82dafed

Please sign in to comment.