aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKenichi Handa2012-08-28 22:44:20 +0900
committerKenichi Handa2012-08-28 22:44:20 +0900
commit4eb4de01df384be9b8d811f7ab476eeb37ece748 (patch)
treed04f0dae31dd8b533a0c3cd738430841ce7ebb84 /lib
parentfabc1281e9cde34ff9a19d843316d2ceca8647ad (diff)
parent4f2daf31078e2cc059710e129dffe0beed8fc7c2 (diff)
downloademacs-4eb4de01df384be9b8d811f7ab476eeb37ece748.tar.gz
emacs-4eb4de01df384be9b8d811f7ab476eeb37ece748.zip
merge trunk
Diffstat (limited to 'lib')
-rw-r--r--lib/execinfo.c3
-rw-r--r--lib/execinfo.in.h54
-rw-r--r--lib/gnulib.mk27
-rw-r--r--lib/makefile.w32-in10
4 files changed, 93 insertions, 1 deletions
diff --git a/lib/execinfo.c b/lib/execinfo.c
new file mode 100644
index 00000000000..0bcd9f078ba
--- /dev/null
+++ b/lib/execinfo.c
@@ -0,0 +1,3 @@
1#include <config.h>
2#define _GL_EXECINFO_INLINE _GL_EXTERN_INLINE
3#include "execinfo.h"
diff --git a/lib/execinfo.in.h b/lib/execinfo.in.h
new file mode 100644
index 00000000000..d76b0e1b771
--- /dev/null
+++ b/lib/execinfo.in.h
@@ -0,0 +1,54 @@
1/* Information about executables.
2
3 Copyright (C) 2012 Free Software Foundation, Inc.
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17
18/* Written by Paul Eggert. */
19
20#ifndef _GL_EXECINFO_H
21#define _GL_EXECINFO_H
22
23_GL_INLINE_HEADER_BEGIN
24#ifndef _GL_EXECINFO_INLINE
25# define _GL_EXECINFO_INLINE _GL_INLINE
26#endif
27
28_GL_EXECINFO_INLINE int
29backtrace (void **buffer, int size)
30{
31 (void) buffer;
32 (void) size;
33 return 0;
34}
35
36_GL_EXECINFO_INLINE char **
37backtrace_symbols (void *const *buffer, int size)
38{
39 (void) buffer;
40 (void) size;
41 return 0;
42}
43
44_GL_EXECINFO_INLINE void
45backtrace_symbols_fd (void *const *buffer, int size, int fd)
46{
47 (void) buffer;
48 (void) size;
49 (void) fd;
50}
51
52_GL_INLINE_HEADER_END
53
54#endif
diff --git a/lib/gnulib.mk b/lib/gnulib.mk
index a90cc59bbde..d49eb4fdf7a 100644
--- a/lib/gnulib.mk
+++ b/lib/gnulib.mk
@@ -21,7 +21,7 @@
21# the same distribution terms as the rest of that program. 21# the same distribution terms as the rest of that program.
22# 22#
23# Generated by gnulib-tool. 23# Generated by gnulib-tool.
24# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timespec-add timespec-sub utimens warnings 24# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=errno --avoid=fcntl --avoid=fcntl-h --avoid=fstat --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo filemode getloadavg getopt-gnu gettime gettimeofday ignore-value intprops largefile lstat manywarnings mktime pselect pthread_sigmask readlink socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timespec-add timespec-sub utimens warnings
25 25
26 26
27MOSTLYCLEANFILES += core *.stackdump 27MOSTLYCLEANFILES += core *.stackdump
@@ -150,6 +150,31 @@ EXTRA_libgnu_a_SOURCES += dup2.c
150 150
151## end gnulib module dup2 151## end gnulib module dup2
152 152
153## begin gnulib module execinfo
154
155BUILT_SOURCES += $(EXECINFO_H)
156
157# We need the following in order to create <execinfo.h> when the system
158# doesn't have one that works.
159if GL_GENERATE_EXECINFO_H
160execinfo.h: execinfo.in.h $(top_builddir)/config.status
161 $(AM_V_GEN)rm -f $@-t $@ && \
162 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
163 cat $(srcdir)/execinfo.in.h; \
164 } > $@-t && \
165 mv $@-t $@
166else
167execinfo.h: $(top_builddir)/config.status
168 rm -f $@
169endif
170MOSTLYCLEANFILES += execinfo.h execinfo.h-t
171
172EXTRA_DIST += execinfo.c execinfo.in.h
173
174EXTRA_libgnu_a_SOURCES += execinfo.c
175
176## end gnulib module execinfo
177
153## begin gnulib module filemode 178## begin gnulib module filemode
154 179
155libgnu_a_SOURCES += filemode.c 180libgnu_a_SOURCES += filemode.c
diff --git a/lib/makefile.w32-in b/lib/makefile.w32-in
index 11251d55f77..f0cea56f829 100644
--- a/lib/makefile.w32-in
+++ b/lib/makefile.w32-in
@@ -28,6 +28,7 @@ GNULIBOBJS = $(BLD)/c-ctype.$(O) \
28 $(BLD)/c-strncasecmp.$(O) \ 28 $(BLD)/c-strncasecmp.$(O) \
29 $(BLD)/dtoastr.$(O) \ 29 $(BLD)/dtoastr.$(O) \
30 $(BLD)/dtotimespec.$(O) \ 30 $(BLD)/dtotimespec.$(O) \
31 $(BLD)/execinfo.$(O) \
31 $(BLD)/getopt.$(O) \ 32 $(BLD)/getopt.$(O) \
32 $(BLD)/getopt1.$(O) \ 33 $(BLD)/getopt1.$(O) \
33 $(BLD)/gettime.$(O) \ 34 $(BLD)/gettime.$(O) \
@@ -129,6 +130,11 @@ $(BLD)/dtotimespec.$(O) : \
129 $(GNU_LIB)/timespec.h \ 130 $(GNU_LIB)/timespec.h \
130 $(CONFIG_H) 131 $(CONFIG_H)
131 132
133$(BLD)/execinfo.$(O) : \
134 $(GNU_LIB)/execinfo.c \
135 $(GNU_LIB)/execinfo.h \
136 $(CONFIG_H)
137
132$(BLD)/getopt.$(O) : \ 138$(BLD)/getopt.$(O) : \
133 $(GNU_LIB)/getopt.c \ 139 $(GNU_LIB)/getopt.c \
134 $(GNU_LIB)/getopt.h \ 140 $(GNU_LIB)/getopt.h \
@@ -299,3 +305,7 @@ getopt_h:
299 < getopt.in.h > getopt_.h-t 305 < getopt.in.h > getopt_.h-t
300 $(CP) getopt_.h-t getopt_.h 306 $(CP) getopt_.h-t getopt_.h
301 - $(DEL) getopt_.h-t 307 - $(DEL) getopt_.h-t
308
309execinfo.h: execinfo.in.h
310 $(CP) execinfo.in.h $@
311