Warning fixes

This commit is contained in:
Marc Aurele La France 2002-02-26 05:10:30 +00:00
parent c5350655be
commit c4bd0638c5
2 changed files with 25 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/* /*
* $XFree86: $ * $XFree86: xc/lib/fontconfig/fc-cache/fc-cache.c,v 1.2 2002/02/15 07:36:14 keithp Exp $
* *
* Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
* *
@ -28,10 +28,21 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
#else #else
#ifdef linux
#define HAVE_GETOPT_LONG 1
#endif
#define HAVE_GETOPT 1 #define HAVE_GETOPT 1
#endif #endif
#ifndef HAVE_GETOPT
#define HAVE_GETOPT 0
#endif
#ifndef HAVE_GETOPT_LONG
#define HAVE_GETOPT_LONG 0
#endif
#if HAVE_GETOPT_LONG #if HAVE_GETOPT_LONG
#undef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#include <getopt.h> #include <getopt.h>
const struct option longopts[] = { const struct option longopts[] = {

View File

@ -1,5 +1,5 @@
/* /*
* $XFree86: $ * $XFree86: xc/lib/fontconfig/fc-list/fc-list.c,v 1.2 2002/02/15 06:01:26 keithp Exp $
* *
* Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
* *
@ -29,10 +29,21 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
#else #else
#ifdef linux
#define HAVE_GETOPT_LONG 1
#endif
#define HAVE_GETOPT 1 #define HAVE_GETOPT 1
#endif #endif
#ifndef HAVE_GETOPT
#define HAVE_GETOPT 0
#endif
#ifndef HAVE_GETOPT_LONG
#define HAVE_GETOPT_LONG 0
#endif
#if HAVE_GETOPT_LONG #if HAVE_GETOPT_LONG
#undef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#include <getopt.h> #include <getopt.h>
const struct option longopts[] = { const struct option longopts[] = {
@ -101,7 +112,7 @@ main (int argc, char **argv)
return 1; return 1;
} }
if (argv[i]) if (argv[i])
pat = FcNameParse (argv[i]); pat = FcNameParse ((const FcChar8 *)argv[i]);
else else
pat = FcPatternCreate (); pat = FcPatternCreate ();