diff options
| -rw-r--r-- | Makefile.am | 3 | ||||
| -rw-r--r-- | Makefile.in | 11 | ||||
| -rw-r--r-- | aclocal.m4 | 386 | ||||
| -rw-r--r-- | cmd.c | 36 | ||||
| -rw-r--r-- | ptr.h | 5 | 
5 files changed, 149 insertions, 292 deletions
| diff --git a/Makefile.am b/Makefile.am index 6e5be04..4a4c3b4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,7 +14,8 @@ catrw_SOURCES = catrw.c  man_MANS = powwow.6  EXTRA_DIST = README README.follow README.term TODO Hacking Config.demo \ -	     powwow.doc powwow.help powwow.6 plugtest.c +	     powwow.doc powwow.help powwow.6 plugtest.c debian/rules \ +	     debian/control debian/changelog  plugtest.so: plugtest.c  	gcc -shared -o plugtest.so plugtest.c diff --git a/Makefile.in b/Makefile.in index 33a722f..7e967b2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.4 from Makefile.am. +# Makefile.in generated by automake 1.9.5 from Makefile.am.  # @configure_input@  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004  Free Software Foundation, Inc. +# 2003, 2004, 2005  Free Software Foundation, Inc.  # This Makefile.in is free software; the Free Software Foundation  # gives unlimited permission to copy and/or distribute it,  # with or without modifications, as long as this notice is preserved. @@ -43,7 +43,8 @@ subdir = .  DIST_COMMON = README $(am__configure_deps) $(powwow_HEADERS) \  	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \  	$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ -	TODO depcomp install-sh missing mkinstalldirs +	TODO config.guess config.sub depcomp install-sh missing \ +	mkinstalldirs  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4  am__aclocal_m4_deps = $(top_srcdir)/configure.in  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -196,7 +197,8 @@ follow_SOURCES = follow.c  catrw_SOURCES = catrw.c  man_MANS = powwow.6  EXTRA_DIST = README README.follow README.term TODO Hacking Config.demo \ -	     powwow.doc powwow.help powwow.6 plugtest.c +	     powwow.doc powwow.help powwow.6 plugtest.c debian/rules \ +	     debian/control debian/changelog  all: all-am @@ -426,6 +428,7 @@ distclean-tags:  distdir: $(DISTFILES)  	$(am__remove_distdir)  	mkdir $(distdir) +	$(mkdir_p) $(distdir)/debian  	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \  	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \  	list='$(DISTFILES)'; for file in $$list; do \ @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.4 -*- Autoconf -*- +# generated automatically by aclocal 1.9.5 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005  Free Software Foundation, Inc.  # This file is free software; the Free Software Foundation  # gives unlimited permission to copy and/or distribute it,  # with or without modifications, as long as this notice is preserved. @@ -11,23 +11,11 @@  # even the implied warranty of MERCHANTABILITY or FITNESS FOR A  # PARTICULAR PURPOSE. -#                                                        -*- Autoconf -*- -# Copyright (C) 2002, 2003  Free Software Foundation, Inc. -# Generated from amversion.in; do not edit by hand. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved.  # AM_AUTOMAKE_VERSION(VERSION)  # ---------------------------- @@ -40,26 +28,15 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])  # Call AM_AUTOMAKE_VERSION so it can be traced.  # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.  AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -	 [AM_AUTOMAKE_VERSION([1.9.4])]) - -# AM_AUX_DIR_EXPAND +	 [AM_AUTOMAKE_VERSION([1.9.5])]) -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. +# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*- -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved.  # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets  # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to @@ -106,26 +83,16 @@ AC_PREREQ([2.50])dnl  am_aux_dir=`cd $ac_aux_dir && pwd`  ]) -# AM_CONDITIONAL                                              -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. +# AM_CONDITIONAL                                            -*- Autoconf -*- -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 6 +# serial 7  # AM_CONDITIONAL(NAME, SHELL-CONDITION)  # ------------------------------------- @@ -149,26 +116,15 @@ AC_CONFIG_COMMANDS_PRE(  Usually this means the macro was only invoked conditionally.]])  fi])]) -# serial 7						-*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005  # Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - +# serial 8  # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be  # written in clear, in which case automake, when reading aclocal.m4, @@ -177,7 +133,6 @@ fi])])  # CC etc. in the Makefile, will ask for an AC_PROG_CC use... -  # _AM_DEPENDENCIES(NAME)  # ----------------------  # See how the compiler implements dependency checking. @@ -317,27 +272,16 @@ AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])  AC_SUBST([AMDEPBACKSLASH])  ]) -# Generate code to set up dependency tracking.   -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 -#   Free Software Foundation, Inc. +# Generate code to set up dependency tracking.              -*- Autoconf -*- -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -#serial 2 +#serial 3  # _AM_OUTPUT_DEPENDENCY_COMMANDS  # ------------------------------ @@ -396,30 +340,19 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],       [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])  ]) -# Do all the work for Automake.                            -*- Autoconf -*- - -# This macro actually does too much some checks are only needed if -# your package does certain things.  But this isn't really a big deal. +# Do all the work for Automake.                             -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005  # Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# serial 12 -# serial 11 +# This macro actually does too much.  Some checks are only needed if +# your package does certain things.  But this isn't really a big deal.  # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])  # AM_INIT_AUTOMAKE([OPTIONS]) @@ -521,51 +454,27 @@ for _am_header in $config_headers :; do  done  echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +  # AM_PROG_INSTALL_SH  # ------------------  # Define $install_sh. - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. -  AC_DEFUN([AM_PROG_INSTALL_SH],  [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl  install_sh=${install_sh-"$am_aux_dir/install-sh"}  AC_SUBST(install_sh)]) -#                                                          -*- Autoconf -*- -# Copyright (C) 2003  Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2003, 2005  Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 1 +# serial 2  # Check whether the underlying file-system supports filenames  # with a leading dot.  For instance MS-DOS doesn't. @@ -580,26 +489,15 @@ fi  rmdir .tst 2>/dev/null  AC_SUBST([am__leading_dot])]) -# Check to see how 'make' treats includes.	-*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +# Check to see how 'make' treats includes.	            -*- Autoconf -*- -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3  # AM_MAKE_INCLUDE()  # ----------------- @@ -643,27 +541,16 @@ AC_MSG_RESULT([$_am_result])  rm -f confinc confmf  ]) -#  -*- Autoconf -*- - +# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4  # AM_MISSING_PROG(NAME, PROGRAM)  # ------------------------------ @@ -689,27 +576,16 @@ else  fi  ]) +# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +  # AM_PROG_MKDIR_P  # ---------------  # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. - -# Copyright (C) 2003, 2004 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - +#  # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories  # created by `make install' are always world readable, even if the  # installer happens to have an overly restrictive umask (e.g. 077). @@ -763,26 +639,15 @@ else  fi  AC_SUBST([mkdir_p])]) -# Helper functions for option handling.                    -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. +# Helper functions for option handling.                     -*- Autoconf -*- -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3  # _AM_MANGLE_OPTION(NAME)  # ----------------------- @@ -807,28 +672,16 @@ AC_DEFUN([_AM_SET_OPTIONS],  AC_DEFUN([_AM_IF_OPTION],  [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# -# Check to make sure that the build environment is sane. -# - -# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -# GNU General Public License for more details. +# Check to make sure that the build environment is sane.    -*- Autoconf -*- -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4  # AM_SANITY_CHECK  # --------------- @@ -871,25 +724,14 @@ Check your system clock])  fi  AC_MSG_RESULT(yes)]) -# AM_PROG_INSTALL_STRIP - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# AM_PROG_INSTALL_STRIP +# ---------------------  # One issue with vendor `install' (even GNU) is that you can't  # specify the program used to strip binaries.  This is especially  # annoying in cross-compiling environments, where the build's strip @@ -912,25 +754,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])  # Check how to create a tarball.                            -*- Autoconf -*- -# Copyright (C) 2004  Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 1 +# Copyright (C) 2004, 2005  Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# serial 2  # _AM_PROG_TAR(FORMAT)  # -------------------- @@ -228,28 +228,48 @@ static void cmd_module __P1 (char *,arg) {  	void *lib;  	void (*func)(); +	int pindex; +	struct stat junk; +	char *prefixes[] = { +		"./", +		"/lib/powwow", +		"/usr/lib/powwow", +		"/usr/local/lib/powwow", +		"$HOME/.powwow/lib" /* this doesn't work, but is here to remind me :p */ +	}; +  	arg = skipspace(arg); -	bzero( libname, 1024 ); -	if( *arg == '.' || *arg == '/' ) { -		/* No path mungling */ -		strncpy( libname, arg, 1024 ); -	}else{ -		snprintf( libname, 1024, "/usr/local/lib/powwow/%s", arg ); +	/* I changed it to work this way so that you can have libs in multiple places and +	 * also eventually to allow it to use .dll instead of .so under the cygwin environment */ +	for( pindex = 0; pindex < 4; pindex++ ) { +		bzero( libname, 1024 ); + +		snprintf( libname, 1024, "%s/%s", prefixes[ pindex ], arg ); +		if( stat( libname, &junk ) == 0 ) { +			break; +		} + +		snprintf( libname, 1024, "%s/%s.so", prefixes[ pindex ], arg ); +		if( stat( libname, &junk ) == 0 ) { +			break; +		}  	}  	/* open lib */  	lib = dlopen( libname, RTLD_LAZY );  	if( ! lib ) { -		PRINTF( "#lib error: %s\n", dlerror() ); +		PRINTF( "#module error: %s\n", dlerror() );  		return; +	}else{ +		PRINTF( "#module loaded %s\n", libname );  	}  	func = dlsym( lib, "powwow_init" );  	if( func ) {  		(*func)();  	}else{ -		PRINTF( "#lib error: %s\n", dlerror() ); +		PRINTF( "#module error: %s\n", dlerror() );  	}  } @@ -56,13 +56,16 @@ char *ptrmchrs  __P ((ptr p, char *q, int lenq));  char *ptrrchrs  __P ((ptr p, ptr q));  char *ptrmrchrs __P ((ptr p, char *q, int lenq)); -char *memrchr   __P ((char *p, int lenp, char c));  char *memchrs   __P ((char *p, int lenp, char *q, int lenq));  char *memrchrs  __P ((char *p, int lenp, char *q, int lenq));  #ifdef _GNU_SOURCE  # define memfind memmem  #else  char *memfind   __P ((char *hay, int haylen, char *needle, int needlelen)); +/* TODO: watch memrchr, it is defined differently here than under _GNU_SOURCE, + * so it could cause bizarre results if a module makes use of a library that + * uses it */ +char *memrchr   __P ((char *p, int lenp, char c));  #endif  #endif /* _PTR_H_ */ | 
