Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Postfix/src/postconf/   (Postfix Mailserver Version 3.11©)  Datei vom 20.10.2011 mit Größe 21 B image not shown  

Quelle  fake_strcmp.c

  Sprache: C
 

/* System library. */
#include <sys_defs.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <dlfcn.h>

/* Utility library. */
#include <msg.h>

/* Global library. */
#include <mail_params.h>

static int (*real_strcmp) (const char *, const char *);

/* find_real_func - libc lookup */

static void *find_real_func(const char *name)
{
    void   *sym;

    /*
     * XXX Casting a data pointer into a function pointer is non-portable.
     * Unfortunately, the dlfunc() function is available on FreeBSD but not
     * on Linux or Solaris. This is a cosmetic issue except on systems with
     * non-flat memory models.
     */

    if ((sym = dlsym(RTLD_NEXT, name)) == 0) {
 fprintf(stderr, "preload error for %s: %s\n", name, dlerror());
 exit(1);
    }
    return (sym);
}

int     strcmp(const char *s1, const char *s2)
{
    if (real_strcmp == 0)
 real_strcmp = find_real_func("strcmp");
    if (real_strcmp(DEF_CONFIG_DIR, s2) == 0)
 return (0);
    return real_strcmp(s1, s2);
}

Messung V0.5 in Prozent
C=78 H=94 G=86

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet am  2026-08-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.