This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: patch for dynl.c



> While working on porting Guile in CVS to DJGPP, I found two instances 
> of a declaration not matching its prototype in libguile/dynl.c. 
> 
> Here's the patch for the mismatch:
> 
> Sat Jun 19 Mark Elbrecht <snowball3@bigfoot.com>
> 	* dynl.c (sysdep_dynl_link, sysdep_dynl_func): Fix declarations to 
> match with prototypes.

I did this instead.  Does this work for you?

1999-06-21  Jim Blandy  <jimb@savonarola.red-bean.com>

	* dynl.c (no_dynl_error, sysdep_dynl_link, sysdep_dynl_unlink,
	sysdep_dynl_func): Use ANSI declarations, and const char *
	pointers.  (Thanks to Mark Elbrecht.)

Index: dynl.c
===================================================================
RCS file: /egcs/carton/guile-home/cvsfiles/guile/guile-core/libguile/dynl.c,v
retrieving revision 1.16
diff -c -c -b -F'^(' -r1.16 dynl.c
*** dynl.c	1999/02/06 12:30:12	1.16
--- dynl.c	1999/06/21 21:45:20
***************
*** 1,6 ****
  /* dynl.c - dynamic linking
   *
!  * Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998 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
--- 1,6 ----
  /* dynl.c - dynamic linking
   *
!  * Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999 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
***************
*** 252,286 ****
  }
  
  static void
! no_dynl_error (subr)
!      char *subr;
  {
    SCM_ALLOW_INTS;
    scm_misc_error (subr, "dynamic linking not available", SCM_EOL);
  }
      
  static void *
! sysdep_dynl_link (filename, subr)
!      const char *filename;
!      const char *subr;
  {
      no_dynl_error (subr);
      return NULL;
  }
  
  static void 
! sysdep_dynl_unlink (handle, subr)
!      void *handle;
!      char *subr;
  {
      no_dynl_error (subr);
  }
  
  static void *
! sysdep_dynl_func (symbol, handle, subr)
!      char *symbol;
!      void *handle;
!      char *subr;
  {
      no_dynl_error (subr);
      return NULL;
--- 252,282 ----
  }
  
  static void
! no_dynl_error (const char *subr)
  {
    SCM_ALLOW_INTS;
    scm_misc_error (subr, "dynamic linking not available", SCM_EOL);
  }
      
  static void *
! sysdep_dynl_link (const char *filename, 
! 		  const char *subr)
  {
      no_dynl_error (subr);
      return NULL;
  }
  
  static void 
! sysdep_dynl_unlink (void *handle, 
! 		    const char *subr)
  {
      no_dynl_error (subr);
  }
  
  static void *
! sysdep_dynl_func (const char *symbol, 
! 		  void *handle,
! 		  const char *subr)
  {
      no_dynl_error (subr);
      return NULL;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]