public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/google/grte/v5-2.27/master] Forward-port google-nsl-stub
@ 2021-08-28  0:37 Fangrui Song
  0 siblings, 0 replies; 2+ messages in thread
From: Fangrui Song @ 2021-08-28  0:37 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=87ac253d003ccd08b76c2984d39089374777bb0e

commit 87ac253d003ccd08b76c2984d39089374777bb0e
Author: Paul Pluzhnikov <ppluzhnikov@google.com>
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
+# <http://www.gnu.org/licenses/>.
+
+# 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
+   <http://www.gnu.org/licenses/>.  */
+
+/* This is a Google-local stub version of nis/ypclnt.c.  These functions
+   are required for dynamic linking of some precompiled executables.  */
+
+#include <stdlib.h>
+#include <stdio.h>
+
+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;
+}


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [glibc/google/grte/v5-2.27/master] Forward-port google-nsl-stub
@ 2020-11-03 21:43 Stan Shebs
  0 siblings, 0 replies; 2+ messages in thread
From: Stan Shebs @ 2020-11-03 21:43 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f0189fe6241e06dc19c7c15ed7374bd19d6d16bb

commit f0189fe6241e06dc19c7c15ed7374bd19d6d16bb
Author: Paul Pluzhnikov <ppluzhnikov@google.com>
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
+# <http://www.gnu.org/licenses/>.
+
+# 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
+   <http://www.gnu.org/licenses/>.  */
+
+/* This is a Google-local stub version of nis/ypclnt.c.  These functions
+   are required for dynamic linking of some precompiled executables.  */
+
+#include <stdlib.h>
+#include <stdio.h>
+
+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;
+}


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-28  0:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-28  0:37 [glibc/google/grte/v5-2.27/master] Forward-port google-nsl-stub Fangrui Song
  -- strict thread matches above, loose matches on Subject: below --
2020-11-03 21:43 Stan Shebs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).