[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnulib] new module: dummy
From: |
Simon Josefsson |
Subject: |
[Bug-gnulib] new module: dummy |
Date: |
Fri, 16 Jul 2004 20:00:40 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) |
Libgsasl only use strdup from gnulib, which already exists on most
systems, so the gnulib library is typically empty. Allegedly, the
linkers on OpenBSD and Mac OS X doesn't like this. I'm using the
following module, and people said it worked. Perhaps it is overkill
to make such a silly thing its own module, but doing so would simplify
things when syncing files from gnulib into my projects.
Btw, is anyone working more on the gnulib-tool, so it can be used to
copy files into projects?
./ChangeLog:
2004-07-16 Simon Josefsson <address@hidden>
* modules/dummy: Add.
lib/ChangeLog:
2004-07-16 Simon Josefsson <address@hidden>
* dummy.c: Add.
Index: lib/dummy.c
===================================================================
RCS file: lib/dummy.c
diff -N lib/dummy.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lib/dummy.c 16 Jul 2004 17:57:53 -0000
@@ -0,0 +1,31 @@
+/* Declare a dummy symbol, to prevent empty libraries from breaking builds.
+ Copyright (C) 2004 Simon Josefsson
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+/*
+ * Some systems, reportedly OpenBSD and Mac OS X, refuse to create
+ * libraries without any symbols. You might get an error like:
+ *
+ * > ar cru .libs/libgl.a
+ * > ar: no archive members specified
+ *
+ * Defining a static symbol, as is done in this file, and adding the
+ * file to the library, will prevent the library from being empty.
+ *
+ */
+
+static char *to_prevent_empty_libraries;
Index: modules/dummy
===================================================================
RCS file: modules/dummy
diff -N modules/dummy
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ modules/dummy 16 Jul 2004 17:57:53 -0000
@@ -0,0 +1,17 @@
+Description:
+Provide a static symbol, to make sure the library is non-empty.
+
+Files:
+lib/dummy.c
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+lib_SOURCES += dummy.c
+
+Include:
+
+Maintainer:
+all
- [Bug-gnulib] new module: dummy,
Simon Josefsson <=