From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2154) id E6A36384A87E; Tue, 3 Nov 2020 21:43:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E6A36384A87E Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Stan Shebs To: glibc-cvs@sourceware.org Subject: [glibc/google/grte/v5-2.27/master] Forward-port google-nsl-stub X-Act-Checkin: glibc X-Git-Author: Paul Pluzhnikov X-Git-Refname: refs/heads/google/grte/v5-2.27/master X-Git-Oldrev: a1e8e5b5d69dcaff1474f1d91996b28a76dd7226 X-Git-Newrev: f0189fe6241e06dc19c7c15ed7374bd19d6d16bb Message-Id: <20201103214348.E6A36384A87E@sourceware.org> Date: Tue, 3 Nov 2020 21:43:48 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2020 21:43:49 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f0189fe6241e06dc19c7c15ed7374bd19d6d16bb commit f0189fe6241e06dc19c7c15ed7374bd19d6d16bb Author: Paul Pluzhnikov Date: Fri Feb 28 06:44:46 2014 -0800 Forward-port google-nsl-stub Diff: --- google-nsl-stub/Makefile | 32 ++++++++++++++++++++++++++++++++ google-nsl-stub/configure | 6 ++++++ google-nsl-stub/shlib-versions | 1 + google-nsl-stub/ypclnt.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 81 insertions(+) diff --git a/google-nsl-stub/Makefile b/google-nsl-stub/Makefile new file mode 100644 index 0000000000..ef5b6a6c24 --- /dev/null +++ b/google-nsl-stub/Makefile @@ -0,0 +1,32 @@ +# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# This file is part of the GNU C Library. + +# The GNU C Library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. + +# The GNU C Library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. + +# You should have received a copy of the GNU Lesser General Public +# License along with the GNU C Library; if not, see +# . + +# Makefile for google-nsl-stub add-on subdirectory of GNU C Library. +# Based on libidn/Makefile. + +subdir := google-nsl-stub + +extra-libs = libnsl +extra-libs-others = $(extra-libs) + +libnsl-routines := ypclnt + +include $(..)Makeconfig + +libnsl-inhibit-o = $(filter-out .os,$(object-suffixes)) + +include $(..)Rules diff --git a/google-nsl-stub/configure b/google-nsl-stub/configure new file mode 100644 index 0000000000..c901084728 --- /dev/null +++ b/google-nsl-stub/configure @@ -0,0 +1,6 @@ +# This is a shell script fragment sourced by the main configure script. +# We're obliged to give here the canonical name that will be used to +# as a subdirectory to search for in other add-ons' sysdeps trees. + +libc_add_on_canonical=google-nsl-stub +libc_add_on_subdirs=. diff --git a/google-nsl-stub/shlib-versions b/google-nsl-stub/shlib-versions new file mode 100644 index 0000000000..ca13c8c1f6 --- /dev/null +++ b/google-nsl-stub/shlib-versions @@ -0,0 +1 @@ +.*-.*-.* libnsl=1 diff --git a/google-nsl-stub/ypclnt.c b/google-nsl-stub/ypclnt.c new file mode 100644 index 0000000000..67867fe7d7 --- /dev/null +++ b/google-nsl-stub/ypclnt.c @@ -0,0 +1,42 @@ +/* Copyright (C) 2013 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* This is a Google-local stub version of nis/ypclnt.c. These functions + are required for dynamic linking of some precompiled executables. */ + +#include +#include + +int yp_get_default_domain(char **domp) { + /* We duplicate glibc's error behavior and return a null pointer. */ + *domp = NULL; + return 12; /* YPERR_NODOM */ +} + +static const char err[] = "not implemented in Google-local stub"; +char *yperr_string(int incode) { + return err; +} + +int yp_match(char *indomain, char *inmap, const char *inkey, int inkeylen, + char **outval, int *outvallen) { + *outval = malloc(2); + (*outval)[0] = '\n'; + (*outval)[1] = '\0'; + *outvallen = 0; + return 0; +}