Blame sysdeps/unix/sysv/linux/ia64/wordexp.c

Packit Service 82fcde
/* Copyright (C) 2001-2018 Free Software Foundation, Inc.
Packit Service 82fcde
   This file is part of the GNU C Library.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is free software; you can redistribute it and/or
Packit Service 82fcde
   modify it under the terms of the GNU Lesser General Public
Packit Service 82fcde
   License as published by the Free Software Foundation; either
Packit Service 82fcde
   version 2.1 of the License, or (at your option) any later version.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service 82fcde
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 82fcde
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 82fcde
   Lesser General Public License for more details.
Packit Service 82fcde
Packit Service 82fcde
   You should have received a copy of the GNU Lesser General Public
Packit Service 82fcde
   License along with the GNU C Library; if not, see
Packit Service 82fcde
   <http://www.gnu.org/licenses/>.  */
Packit Service 82fcde
Packit Service 82fcde
#include <shlib-compat.h>
Packit Service 82fcde
Packit Service 82fcde
/* For Linux/Alpha we have to make the wordexp symbols versioned.  */
Packit Service 82fcde
#define wordexp(words, pwordexp, flags) \
Packit Service 82fcde
  __new_wordexp (words, pwordexp, flags)
Packit Service 82fcde
Packit Service 82fcde
#include <posix/wordexp.c>
Packit Service 82fcde
Packit Service 82fcde
versioned_symbol (libc, __new_wordexp, wordexp, GLIBC_2_2_2);
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2_2)
Packit Service 82fcde
/* The old, incorrect wordexp_t definition.  */
Packit Service 82fcde
typedef struct
Packit Service 82fcde
  {
Packit Service 82fcde
    int we_wordc;		/* Count of words matched.  */
Packit Service 82fcde
    char **we_wordv;		/* List of expanded words.  */
Packit Service 82fcde
    int we_offs;		/* Slots to reserve in `we_wordv'.  */
Packit Service 82fcde
  } old_wordexp_t;
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
int
Packit Service 82fcde
attribute_compat_text_section
Packit Service 82fcde
__old_wordexp (const char *words, old_wordexp_t *pwordexp, int flags)
Packit Service 82fcde
{
Packit Service 82fcde
  wordexp_t we;
Packit Service 82fcde
  int result;
Packit Service 82fcde
Packit Service 82fcde
  we.we_wordc = pwordexp->we_wordc;
Packit Service 82fcde
  we.we_wordv = pwordexp->we_wordv;
Packit Service 82fcde
  we.we_offs = pwordexp->we_offs;
Packit Service 82fcde
Packit Service 82fcde
  result = __new_wordexp (words, &we, flags);
Packit Service 82fcde
Packit Service 82fcde
  pwordexp->we_wordc = we.we_wordc;
Packit Service 82fcde
  pwordexp->we_wordv = we.we_wordv;
Packit Service 82fcde
  pwordexp->we_offs = we.we_offs;
Packit Service 82fcde
Packit Service 82fcde
  return result;
Packit Service 82fcde
}
Packit Service 82fcde
compat_symbol (libc, __old_wordexp, wordexp, GLIBC_2_1);
Packit Service 82fcde
#endif