Age | Commit message (Collapse) | Author | Files | Lines |
|
The sample libabc includes functions to get a "thing", as a sample
sub-object of the overall library context. Each "thing" has a reference
to the parent library context, and a function to return that reference.
Given that, abc_thing_new_from_string should call abc_ref, and
abc_thing_unref should call abc_unref when freeing a thing.
|
|
|
|
|
|
|
|
It has changed in the past, and these days, anyone can get a copy of the
LGPL via the web rather than by post.
|
|
|
|
Otherwise, if someone uses "sh autogen.sh", the -e will get ignored.
|
|
As README points out, the library should not execute out-of-process
tools. Thus, it should never need to know LIBEXECDIR.
|
|
Source files, including those in the library itself, should include
<abc/example.h>, not <example.h>.
|
|
All three functions gave similar warning, here is a sample who the
message text looked.
src/libabc.c:236:24: warning: redundant redeclaration of 'abc_list_entry_get_next' [-Wredundant-decls]
struct abc_list_entry *abc_list_entry_get_next(struct abc_list_entry *list_entry);
^
In file included from src/libabc.c:30:0:
./src/abc/libabc.h:55:24: note: previous declaration of 'abc_list_entry_get_next' was here
struct abc_list_entry *abc_list_entry_get_next(struct abc_list_entry *list_entry);
|
|
|
|
|
|
Vertical lists, e.g., one string per line, can be version controlled
individually. This commit also removes -Wpointer-arith duplicate from
my_CFLAGS variable.
|
|
Returning anything else but NULL would suggest the caller's
reference might still be valid, but it isn't, because the
caller just invoked _unref() after all. This turns the return
value into a typesafe shortcut that allows unreffing and
resetting a reference in one line. In contrast to solutions
for this which take a pointer to a pointer to accomplish the
same this solution is just syntactic sugar the developer can
make use of but doesn't have to, and this is particularly
useful when immediately unreffing objects returned by function
calls.
|
|
There must be only one wildcard local in the linker script, otherwise
gold warns:
warning: wildcard match appears in both version 'LIBABC_1' and
'LIBABC_3' in script
|
|
|
|
It is very frequent to find userspace code including <asm/byteorder.h>
and/or using/redefining cpu_to_*, *_to_cpu, swabxx from the linux kernel
headers. Add a note asking people to stick to the glibc API.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"Similarly, you should not rely on AC_CONFIG_FILES to replace bindir
and friends in your shell scripts and other files; instead, let make
manage their replacement."
http://www.gnu.org/software/autoconf/manual/autoconf.html#Makefile-Substitutions
|
|
Reduces name clash potential, and is clearer once one's project starts
to accumulate more header files.
|
|
It's 2011 already.
|
|
|
|
Good projects should always use these flag combinations -- not just
when autogen.sh is called, but also when ./configure is run.
|
|
|
|
|
|
When the version map changes, we want to have a re-link occur, of
course.
|
|
|
|
|
|
|
|
|
|
- Tell the compiler to go in C99 mode
- Prefer PIC code only
Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
|
|
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
|
|
- Remove SUBDIRS variable on top-level Makefile.am; using
SUBDIRS=. is only meaningful to ask automake an explicit ordering of the
sub-directory processing.
- Add $(AM_LDFLAGS) to the library's LDFLAGS; this is important because
one of the most common mistake is forgetting that the variable is an
override.
- check_PROGRAMS only build the programs, but doesn't run them; TESTS run
the command; this way it is possible to execute a script, but build a
binary that the script uses.
- Pass CFLAGS in ./configure command line when using ./autogen.sh.
- Use M4sh syntax instead of sh syntax for conditionals (AS_IF rather than
if); when you don't use M4sh, AC_REQUIRE does not behave correctly,
leading to a common mistake when using PKG_CHECK_MODULES.
- Add [default=(enabled|disabled)] comments in options description; this
makes them behave a lot more like autoconf's own descriptions.
- Correct a warning in libabc.c (return with no value in function
returning non-void).
- Fix path mistakes in pkg-config data file.
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
|
|
|
|
LGPL2-only (and LGPL2.1-only) works with GPL3, because of clause 3 of
the LGPL, which says "If a newer version than version 2 of the ordinary
GNU General Public License has appeared, then you can specify that
version instead if you wish.".
The case that doesn't work: GPL2-only with LGPL3 or later, because the
LGPL3 only allows conversion to the GPL3, not the GPL2.
|
|
This reduces the number of edits needed when using this project as a
template.
|
|
|
|
|
|
|
|
|