Ignore:
Timestamp:
Jul 13, 2017, 9:01:05 AM (22 months ago)
Author:
Juanma
Message:

Initial release

File:
1 edited

Legend:

Unmodified
Added
Removed
  • squid-ssl/trunk/fuentes/libltdl/loaders/preopen.c

    r5495 r5496  
    11/* loader-preopen.c -- emulate dynamic linking using preloaded_symbols
    22
    3    Copyright (C) 1998-2000, 2004, 2006-2008, 2011-2015 Free Software
    4    Foundation, Inc.
     3   Copyright (C) 1998, 1999, 2000, 2004, 2006,
     4                 2007, 2008 Free Software Foundation, Inc.
    55   Written by Thomas Tanner, 1998
    66
     
    114114/* A function called through the vtable to initialise this loader.  */
    115115static int
    116 vl_init (lt_user_data loader_data LT__UNUSED)
     116vl_init (lt_user_data LT__UNUSED loader_data)
    117117{
    118118  int errors = 0;
     
    131131   longer needed by the application.  */
    132132static int
    133 vl_exit (lt_user_data loader_data LT__UNUSED)
     133vl_exit (lt_user_data LT__UNUSED loader_data)
    134134{
    135135  vtable = NULL;
     
    143143   module for processing with this loader's other vtable functions.  */
    144144static lt_module
    145 vm_open (lt_user_data loader_data LT__UNUSED, const char *filename,
    146          lt_dladvise advise LT__UNUSED)
     145vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
     146         lt_dladvise LT__UNUSED advise)
    147147{
    148148  symlist_chain *lists;
     
    169169      for (symbol= lists->symlist; symbol->name; ++symbol)
    170170        {
    171           if (!symbol->address && STREQ (symbol->name, filename))
     171          if (!symbol->address && streq (symbol->name, filename))
    172172            {
    173173              /* If the next symbol's name and address is 0, it means
     
    196196   should be unloaded.  */
    197197static int
    198 vm_close (lt_user_data loader_data LT__UNUSED, lt_module module LT__UNUSED)
     198vm_close (lt_user_data LT__UNUSED loader_data, lt_module LT__UNUSED module)
    199199{
    200200  /* Just to silence gcc -Wall */
     
    207207   a symbol loaded from a particular module.  */
    208208static void *
    209 vm_sym (lt_user_data loader_data LT__UNUSED, lt_module module, const char *name)
     209vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name)
    210210{
    211211  lt_dlsymlist         *symbol = (lt_dlsymlist*) module;
    212212
    213   if (symbol[1].name && STREQ (symbol[1].name, "@INIT@"))
    214     {
    215       symbol++;                 /* Skip optional init entry. */
    216     }
    217 
    218213  symbol +=2;                   /* Skip header (originator then libname). */
    219214
    220215  while (symbol->name)
    221216    {
    222       if (STREQ (symbol->name, name))
     217      if (streq (symbol->name, name))
    223218        {
    224219          return symbol->address;
     
    279274          tmp->next = preloaded_symlists;
    280275          preloaded_symlists = tmp;
    281 
    282           if (symlist[1].name && STREQ (symlist[1].name, "@INIT@"))
    283             {
    284               void (*init_symlist)(void);
    285               *(void **)(&init_symlist) = symlist[1].address;
    286               (*init_symlist)();
    287             }
    288276        }
    289277      else
     
    349337    {
    350338      /* ...that was preloaded by the requesting ORIGINATOR... */
    351       if ((originator && STREQ (list->symlist->name, originator))
    352           || (!originator && STREQ (list->symlist->name, "@PROGRAM@")))
     339      if ((originator && streq (list->symlist->name, originator))
     340          || (!originator && streq (list->symlist->name, "@PROGRAM@")))
    353341        {
    354342          const lt_dlsymlist *symbol;
     
    362350            {
    363351              if ((symbol->address == 0)
    364                   && (STRNEQ (symbol->name, "@PROGRAM@")))
     352                  && (strneq (symbol->name, "@PROGRAM@")))
    365353                {
    366354                  lt_dlhandle handle = lt_dlopen (symbol->name);
Note: See TracChangeset for help on using the changeset viewer.