~jaypipes/drizzle/bugs

« back to all changes in this revision

Viewing changes to mysys/default.cc

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 
42
42
#include <mysys/cached_directory.h>
43
43
 
44
 
#include <stdio.h>
 
44
#ifdef HAVE_SYS_STAT_H
 
45
# include <sys/stat.h>
 
46
#endif
 
47
 
 
48
#include <cstdio>
45
49
#include <algorithm>
46
50
 
 
51
 
47
52
using namespace std;
48
53
 
49
54
const char *my_defaults_file=0;
318
323
    /* Skip program name or previously handled argument */
319
324
    argv++;
320
325
    prev_argc= argc;                            /* To check if we found */
321
 
    if (!*defaults && is_prefix(*argv,"--defaults-file="))
 
326
    if (!*defaults && (strncmp(*argv,"--defaults-file=", sizeof("--defaults-file=")) == 0))
322
327
    {
323
328
      *defaults= *argv + sizeof("--defaults-file=")-1;
324
329
       argc--;
325
330
       continue;
326
331
    }
327
 
    if (!*extra_defaults && is_prefix(*argv,"--defaults-extra-file="))
 
332
    if (!*extra_defaults && (strncmp(*argv, "--defaults-extra-file=", sizeof("--defaults-extra-file=")) == 0))
328
333
    {
329
334
      *extra_defaults= *argv + sizeof("--defaults-extra-file=")-1;
330
335
      argc--;
331
336
      continue;
332
337
    }
333
 
    if (!*group_suffix && is_prefix(*argv, "--defaults-group-suffix="))
 
338
    if (!*group_suffix && (strncmp(*argv, "--defaults-group-suffix=", sizeof("--defaults-group-suffix=")) == 0))
334
339
    {
335
340
      *group_suffix= *argv + sizeof("--defaults-group-suffix=")-1;
336
341
      argc--;