<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/shared/nm-default.h, branch lr/api-docs</title>
<subtitle>gitlab.freedesktop.org: NetworkManager/NetworkManager.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/'/>
<entry>
<title>build: disable type checks in G_TYPE_CHECK_INSTANCE_CAST() macros (bgo#771120)</title>
<updated>2016-09-12T11:53:34+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2016-09-09T12:31:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=eb8da4c2820690a55e1ced721f710eb616fecb60'/>
<id>eb8da4c2820690a55e1ced721f710eb616fecb60</id>
<content type='text'>
Avoid the pointless overhead. Even glib disables them unless you build
with --enable-debug.

https://bugzilla.gnome.org/show_bug.cgi?id=771120
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid the pointless overhead. Even glib disables them unless you build
with --enable-debug.

https://bugzilla.gnome.org/show_bug.cgi?id=771120
</pre>
</div>
</content>
</entry>
<entry>
<title>build: cleanup src/Makefile.am</title>
<updated>2016-08-11T09:54:18+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2016-07-08T11:12:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=3d30004710d46c3e7aa66773e3c9a2c36ad048e6'/>
<id>3d30004710d46c3e7aa66773e3c9a2c36ad048e6</id>
<content type='text'>
- reorder entries in src/Makefile.am so that general names
  are all at the beginning (AM_CPPFLAGS, sbin_PROGRAMS)
  and the names for a certain library/binary are grouped
  together
- have libNetworkManager.la reuse libNetworkManagerBase.la.
- let all components in src/Makefile.am use the same AM_CPPFLAGS,
  except libsystem-nm.la.
- move callouts/nm-dispatcher-api.h to shared/ directory. It
  is obviously not internal API to callouts, and callouts is
  not a library. Thus, the right place is shared/.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- reorder entries in src/Makefile.am so that general names
  are all at the beginning (AM_CPPFLAGS, sbin_PROGRAMS)
  and the names for a certain library/binary are grouped
  together
- have libNetworkManager.la reuse libNetworkManagerBase.la.
- let all components in src/Makefile.am use the same AM_CPPFLAGS,
  except libsystem-nm.la.
- move callouts/nm-dispatcher-api.h to shared/ directory. It
  is obviously not internal API to callouts, and callouts is
  not a library. Thus, the right place is shared/.
</pre>
</div>
</content>
</entry>
<entry>
<title>shared: drop function name from g_return_val_if_reached()</title>
<updated>2016-07-05T18:46:49+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2016-07-05T16:26:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=42940fd66be9b412523cc4cedf9b24f0fb95e477'/>
<id>42940fd66be9b412523cc4cedf9b24f0fb95e477</id>
<content type='text'>
When using g_return_val_if_reached(), the default macro would include
the function name. This name is increasing the binary size. Replace
it in non-debug builds.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using g_return_val_if_reached(), the default macro would include
the function name. This name is increasing the binary size. Replace
it in non-debug builds.
</pre>
</div>
</content>
</entry>
<entry>
<title>shared: include "nm-glib.h" from "nm-macros-internal.h"</title>
<updated>2016-06-16T08:45:54+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2016-06-15T14:09:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=3bcec4067fb0fb1c4eaa3de0b7c2802f689702a5'/>
<id>3bcec4067fb0fb1c4eaa3de0b7c2802f689702a5</id>
<content type='text'>
"nm-glib.h" is our most basic header. "nm-macros-internal.h" extends
on that. Thus, let "nm-macros-internal.h" include "nm-glib.h".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"nm-glib.h" is our most basic header. "nm-macros-internal.h" extends
on that. Thus, let "nm-macros-internal.h" include "nm-glib.h".
</pre>
</div>
</content>
</entry>
<entry>
<title>shared: include "gsystem-local-alloc.h" from "nm-glib.h"</title>
<updated>2016-06-16T08:45:54+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2016-06-15T14:07:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=037462e90273ce25335d0a0a461748d3503ce13d'/>
<id>037462e90273ce25335d0a0a461748d3503ce13d</id>
<content type='text'>
"nm-glib.h" is the most basic header, the one we cannot do without.
("nm-default.h", is already more generic, the one which every common
source file in NetworkManager repository should include).

Let "gsystem-local-alloc.h" be included by "nm-glib.h" and nowhere
else.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"nm-glib.h" is the most basic header, the one we cannot do without.
("nm-default.h", is already more generic, the one which every common
source file in NetworkManager repository should include).

Let "gsystem-local-alloc.h" be included by "nm-glib.h" and nowhere
else.
</pre>
</div>
</content>
</entry>
<entry>
<title>shared: move shared files to subdirectory "shared/nm-utils/"</title>
<updated>2016-06-16T08:45:53+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2016-06-15T13:29:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=4b288136e1893a7ac21f04370008e37feb3cfac9'/>
<id>4b288136e1893a7ac21f04370008e37feb3cfac9</id>
<content type='text'>
The "shared" directory contains files that are possibly used by all components
of NetworkManager repository.

Some of these files are even copied as-is to other projects (VPN plugins, nm-applet)
and used there without modification. Move those files to a separate directory.
By moving them to a common directory, it is clearer that they belong
together. Also, you can easier compare the copied versions to their
original via

  $ diff -r ./shared/nm-utils/ /path/to/nm-vpn-plugin/shared/nm-utils/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "shared" directory contains files that are possibly used by all components
of NetworkManager repository.

Some of these files are even copied as-is to other projects (VPN plugins, nm-applet)
and used there without modification. Move those files to a separate directory.
By moving them to a common directory, it is clearer that they belong
together. Also, you can easier compare the copied versions to their
original via

  $ diff -r ./shared/nm-utils/ /path/to/nm-vpn-plugin/shared/nm-utils/
</pre>
</div>
</content>
</entry>
<entry>
<title>build: remove assertion messages in non-debug build</title>
<updated>2016-06-09T10:03:39+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2016-06-06T13:20:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=00f58adb16ef469f0e6110095a0536bcd07e6366'/>
<id>00f58adb16ef469f0e6110095a0536bcd07e6366</id>
<content type='text'>
Assertions like g_assert*() and g_return_*() contain the stringified
test expression. This string ends up in the binary and increases its
size.

We usually don't have failing assertions. These string are a waste,
instead the file and line number shall suffice.

It reduces the striped size of the NetworkManager binary from 2500k
to 2392k, that is -108k, -4.3%.

This changes

 - "g_assert (1 == 2);"
   from: NetworkManager:ERROR:source.c:347:some_function: assertion failed: (1 == 2)
   to:   NetworkManager:ERROR:source.c:347:&lt;unknown-fcn&gt;: assertion failed: (&lt;dropped&gt;)

 - "g_return_if_fail (1 == 2);"
   from: (process:21024): NetworkManager-CRITICAL **: some_function: assertion '1 == 2' failed
   to:   (process:21024): NetworkManager-CRITICAL **: ((source.c:347)): assertion '&lt;dropped&gt;' failed

When doing a non-debug build, those string are now removed. Debug-builds
can be enabled by setting --with-more-assert=$LEVEL to larger then zero.

https://bugzilla.gnome.org/show_bug.cgi?id=767296
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Assertions like g_assert*() and g_return_*() contain the stringified
test expression. This string ends up in the binary and increases its
size.

We usually don't have failing assertions. These string are a waste,
instead the file and line number shall suffice.

It reduces the striped size of the NetworkManager binary from 2500k
to 2392k, that is -108k, -4.3%.

This changes

 - "g_assert (1 == 2);"
   from: NetworkManager:ERROR:source.c:347:some_function: assertion failed: (1 == 2)
   to:   NetworkManager:ERROR:source.c:347:&lt;unknown-fcn&gt;: assertion failed: (&lt;dropped&gt;)

 - "g_return_if_fail (1 == 2);"
   from: (process:21024): NetworkManager-CRITICAL **: some_function: assertion '1 == 2' failed
   to:   (process:21024): NetworkManager-CRITICAL **: ((source.c:347)): assertion '&lt;dropped&gt;' failed

When doing a non-debug build, those string are now removed. Debug-builds
can be enabled by setting --with-more-assert=$LEVEL to larger then zero.

https://bugzilla.gnome.org/show_bug.cgi?id=767296
</pre>
</div>
</content>
</entry>
<entry>
<title>build: disable deprecation checks for internal compilation</title>
<updated>2016-04-05T20:22:58+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2016-04-05T19:18:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=9152dec99f479d82400f464ab47d45b8cbd8e0eb'/>
<id>9152dec99f479d82400f464ab47d45b8cbd8e0eb</id>
<content type='text'>
For internal compilation we want to be able to use deprecated
API without warnings.

Define the version min/max macros to effectively disable deprecation
warnings.

However, don't do it via CFLAGS option in the makefiles, instead hack it
to "nm-default.h". After all, *every* source file that is for internal
compilation needs to include this header as first.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For internal compilation we want to be able to use deprecated
API without warnings.

Define the version min/max macros to effectively disable deprecation
warnings.

However, don't do it via CFLAGS option in the makefiles, instead hack it
to "nm-default.h". After all, *every* source file that is for internal
compilation needs to include this header as first.
</pre>
</div>
</content>
</entry>
<entry>
<title>shared: include "nm-shared-utils.h"</title>
<updated>2016-03-26T11:10:53+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2016-03-18T13:08:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=5de30dd0296087b5bbfac3cd44cc325a31ceab14'/>
<id>5de30dd0296087b5bbfac3cd44cc325a31ceab14</id>
<content type='text'>
Include it via "nm-default.h" to all projects.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Include it via "nm-default.h" to all projects.
</pre>
</div>
</content>
</entry>
<entry>
<title>all: cleanup includes and let "nm-default.h" include "config.h"</title>
<updated>2016-02-19T16:53:25+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2016-02-19T13:57:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=8bace23bebcc28396460663203d54aac4ec8ffbf'/>
<id>8bace23bebcc28396460663203d54aac4ec8ffbf</id>
<content type='text'>
- All internal source files (except "examples", which are not internal)
  should include "config.h" first. As also all internal source
  files should include "nm-default.h", let "config.h" be included
  by "nm-default.h" and include "nm-default.h" as first in every
  source file.
  We already wanted to include "nm-default.h" before other headers
  because it might contains some fixes (like "nm-glib.h" compatibility)
  that is required first.

- After including "nm-default.h", we optinally allow for including the
  corresponding header file for the source file at hand. The idea
  is to ensure that each header file is self contained.

- Don't include "config.h" or "nm-default.h" in any header file
  (except "nm-sd-adapt.h"). Public headers anyway must not include
  these headers, and internal headers are never included after
  "nm-default.h", as of the first previous point.

- Include all internal headers with quotes instead of angle brackets.
  In practice it doesn't matter, because in our public headers we must
  include other headers with angle brackets. As we use our public
  headers also to compile our interal source files, effectively the
  result must be the same. Still do it for consistency.

- Except for &lt;config.h&gt; itself. Include it with angle brackets as suggested by
  https://www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Headers
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- All internal source files (except "examples", which are not internal)
  should include "config.h" first. As also all internal source
  files should include "nm-default.h", let "config.h" be included
  by "nm-default.h" and include "nm-default.h" as first in every
  source file.
  We already wanted to include "nm-default.h" before other headers
  because it might contains some fixes (like "nm-glib.h" compatibility)
  that is required first.

- After including "nm-default.h", we optinally allow for including the
  corresponding header file for the source file at hand. The idea
  is to ensure that each header file is self contained.

- Don't include "config.h" or "nm-default.h" in any header file
  (except "nm-sd-adapt.h"). Public headers anyway must not include
  these headers, and internal headers are never included after
  "nm-default.h", as of the first previous point.

- Include all internal headers with quotes instead of angle brackets.
  In practice it doesn't matter, because in our public headers we must
  include other headers with angle brackets. As we use our public
  headers also to compile our interal source files, effectively the
  result must be the same. Still do it for consistency.

- Except for &lt;config.h&gt; itself. Include it with angle brackets as suggested by
  https://www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Headers
</pre>
</div>
</content>
</entry>
</feed>
