Back to index

glibc  2.9
Defines | Functions
dl-librecon.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define EXTRA_LD_ENVVARS_13
#define DL_OSVERSION_INIT

Functions

static void __attribute__ ((unused, always_inline)) _dl_osversion_init(char *assume_kernel)

Define Documentation

Value:
do {                                                                 \
    char *assume_kernel = getenv ("LD_ASSUME_KERNEL");                      \
    if (assume_kernel)                                                      \
      _dl_osversion_init (assume_kernel);                            \
  } while (0)

Definition at line 54 of file dl-librecon.h.

Value:
if (memcmp (envline, "ASSUME_KERNEL", 13) == 0)                      \
      {                                                                     \
       _dl_osversion_init (&envline[14]);                            \
       break;                                                        \
      }

Definition at line 47 of file dl-librecon.h.


Function Documentation

static void __attribute__ ( (unused, always_inline)  ) [inline, static]

Definition at line 24 of file dl-librecon.h.

{
  unsigned long int i, j, osversion = 0;
  char *p = assume_kernel, *q;

  for (i = 0; i < 3; i++, p = q + 1)
    {
      j = __strtoul_internal (p, &q, 0, 0);
      if (j >= 255 || p == q || (i < 2 && *q && *q != '.'))
       {
         osversion = 0;
         break;
       }
      osversion |= j << (16 - 8 * i);
      if (!*q)
       break;
    }
  if (osversion)
    GLRO(dl_osversion) = osversion;
}

Here is the call graph for this function: