Browse Source

ccan: Correct some poor conventions in _info includes

There are a couple of small problems with the includes used in most of
ccan's _info files.

   * _info routinely uses printf(), and so should include <stdio.h>, but
only some of them do.  We get away with it, because they do include
<string.h>, which apparently includes <stdio.h> indirectly, but we should
be explicit about it.

   * Most _info files were including config.h after the system headers.
That _seems_ sensible, but actually causes problems.  Because config.h
defines _GNU_SOURCE it can change the behaviour of the system headers.
More specifically it can make them behave differently to how the individual
module headers (which have included config.h) expects them to behave.

This patch adjusts all the existing _info files and, more importantly,
the template constructed by ccanlint.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
David Gibson 11 years ago
parent
commit
291237b4fe
88 changed files with 118 additions and 75 deletions
  1. 1 1
      ccan/alignof/_info
  2. 1 1
      ccan/antithread/_info
  3. 1 1
      ccan/antithread/alloc/_info
  4. 2 0
      ccan/argcheck/_info
  5. 1 1
      ccan/array_size/_info
  6. 1 1
      ccan/asearch/_info
  7. 1 0
      ccan/asort/_info
  8. 2 1
      ccan/asprintf/_info
  9. 2 1
      ccan/autodata/_info
  10. 2 1
      ccan/avl/_info
  11. 2 1
      ccan/bdelta/_info
  12. 2 1
      ccan/bitmap/_info
  13. 1 1
      ccan/block_pool/_info
  14. 2 1
      ccan/breakpoint/_info
  15. 2 1
      ccan/btree/_info
  16. 1 1
      ccan/build_assert/_info
  17. 1 0
      ccan/bytestring/_info
  18. 2 1
      ccan/cast/_info
  19. 1 1
      ccan/ccan_tokenizer/_info
  20. 1 1
      ccan/charset/_info
  21. 1 1
      ccan/check_type/_info
  22. 1 1
      ccan/ciniparser/_info
  23. 1 1
      ccan/compiler/_info
  24. 1 1
      ccan/container_of/_info
  25. 4 0
      ccan/cpuid/_info
  26. 1 0
      ccan/crc/_info
  27. 1 1
      ccan/crcsync/_info
  28. 1 1
      ccan/daemon_with_notify/_info
  29. 1 1
      ccan/daemonize/_info
  30. 2 1
      ccan/darray/_info
  31. 1 0
      ccan/dgraph/_info
  32. 1 1
      ccan/endian/_info
  33. 1 1
      ccan/err/_info
  34. 1 1
      ccan/failtest/_info
  35. 1 1
      ccan/grab_file/_info
  36. 1 0
      ccan/hash/_info
  37. 2 1
      ccan/heap/_info
  38. 1 0
      ccan/htable/_info
  39. 1 1
      ccan/idtree/_info
  40. 1 1
      ccan/ilog/_info
  41. 1 1
      ccan/io/_info
  42. 1 1
      ccan/isaac/_info
  43. 1 0
      ccan/iscsi/_info
  44. 2 1
      ccan/jacobson_karels/_info
  45. 1 1
      ccan/jmap/_info
  46. 1 1
      ccan/jset/_info
  47. 2 1
      ccan/json/_info
  48. 1 0
      ccan/lbalance/_info
  49. 1 1
      ccan/likely/_info
  50. 1 1
      ccan/list/_info
  51. 1 1
      ccan/md4/_info
  52. 2 1
      ccan/minmax/_info
  53. 2 1
      ccan/net/_info
  54. 1 0
      ccan/nfs/_info
  55. 1 1
      ccan/noerr/_info
  56. 2 1
      ccan/objset/_info
  57. 1 1
      ccan/ogg_to_pcm/_info
  58. 1 1
      ccan/opt/_info
  59. 2 1
      ccan/ptr_valid/_info
  60. 1 0
      ccan/rbtree/_info
  61. 2 1
      ccan/rbuf/_info
  62. 1 1
      ccan/read_write_all/_info
  63. 1 1
      ccan/short_types/_info
  64. 1 1
      ccan/siphash/_info
  65. 1 1
      ccan/sparse_bsearch/_info
  66. 1 1
      ccan/str/_info
  67. 1 1
      ccan/stringmap/_info
  68. 2 1
      ccan/strmap/_info
  69. 2 1
      ccan/strset/_info
  70. 2 1
      ccan/take/_info
  71. 1 1
      ccan/tal/_info
  72. 1 1
      ccan/tal/grab_file/_info
  73. 1 1
      ccan/tal/link/_info
  74. 2 1
      ccan/tal/path/_info
  75. 1 1
      ccan/tal/str/_info
  76. 1 1
      ccan/tal/talloc/_info
  77. 1 1
      ccan/talloc/_info
  78. 1 1
      ccan/tally/_info
  79. 1 1
      ccan/tap/_info
  80. 1 0
      ccan/tcon/_info
  81. 2 1
      ccan/time/_info
  82. 2 1
      ccan/timer/_info
  83. 1 1
      ccan/tlist/_info
  84. 2 1
      ccan/ttxml/_info
  85. 1 1
      ccan/typesafe_cb/_info
  86. 2 1
      ccan/version/_info
  87. 1 1
      ccan/wwviaudio/_info
  88. 2 1
      tools/ccanlint/tests/info_exists.c

+ 1 - 1
ccan/alignof/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * alignof - ALIGNOF() macro to determine alignment of a type.

+ 1 - 1
ccan/antithread/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * antithread - Accelerated Native Technology Implementation of "threads"

+ 1 - 1
ccan/antithread/alloc/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * antithread/alloc - memory allocator routines

+ 2 - 0
ccan/argcheck/_info

@@ -1,4 +1,6 @@
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * argcheck - macros to check arguments at runtime

+ 1 - 1
ccan/array_size/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * array_size - routine for safely deriving the size of a visible array.

+ 1 - 1
ccan/asearch/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * asearch - typesafe binary search (bsearch)

+ 1 - 0
ccan/asort/_info

@@ -1,3 +1,4 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 

+ 2 - 1
ccan/asprintf/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * asprintf - asprintf wrapper (and if necessary, implementation).

+ 2 - 1
ccan/autodata/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * autodata - stash pointers in your binary for automatic registration

+ 2 - 1
ccan/avl/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * avl - Key-value dictionary based on AVL trees

+ 2 - 1
ccan/bdelta/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * bdelta - Generate and apply binary deltas

+ 2 - 1
ccan/bitmap/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * bitmap - bitmap handling

+ 1 - 1
ccan/block_pool/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * block_pool - An efficient allocator for blocks that don't need to be resized or freed.

+ 2 - 1
ccan/breakpoint/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * breakpoint - break if the program is run under gdb.

+ 2 - 1
ccan/btree/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * btree - Efficient sorted associative container based on B-trees.

+ 1 - 1
ccan/build_assert/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * build_assert - routines for build-time assertions

+ 1 - 0
ccan/bytestring/_info

@@ -1,3 +1,4 @@
+#include <stdio.h>
 #include <string.h>
 #include "config.h"
 

+ 2 - 1
ccan/cast/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * cast - routines for safer casting.

+ 1 - 1
ccan/ccan_tokenizer/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
-#include "config.h"
 
 /**
  * ccan_tokenizer - A full-text lexer for C source files

+ 1 - 1
ccan/charset/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * charset - character set conversion and validation routines

+ 1 - 1
ccan/check_type/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * check_type - routines for compile time type checking

+ 1 - 1
ccan/ciniparser/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * ciniparser - easily parse and manipulate ini style configuration files

+ 1 - 1
ccan/compiler/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
-#include "config.h"
 
 /**
  * compiler - macros for common compiler extensions

+ 1 - 1
ccan/container_of/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * container_of - routine for upcasting

+ 4 - 0
ccan/cpuid/_info

@@ -1,3 +1,7 @@
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+
 #include "cpuid.h"
 
 /**

+ 1 - 0
ccan/crc/_info

@@ -1,3 +1,4 @@
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 

+ 1 - 1
ccan/crcsync/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * crcsync - routines to use crc for an rsync-like protocol.

+ 1 - 1
ccan/daemon_with_notify/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * daemon_with_notify - daemonize a process, can wait for child to signal readiness

+ 1 - 1
ccan/daemonize/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * daemonize - routine to turn a process into a well-behaved daemon.

+ 2 - 1
ccan/darray/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 #include "ccan/darray/darray.h"
 

+ 1 - 0
ccan/dgraph/_info

@@ -1,4 +1,5 @@
 #include "config.h"
+#include <stdio.h>
 #include <string.h>
 
 /**

+ 1 - 1
ccan/endian/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * endian - endian conversion macros for simple types

+ 1 - 1
ccan/err/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * err - err(), errx(), warn() and warnx(), as per BSD's err.h.

+ 1 - 1
ccan/failtest/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * failtest - unit test helpers for testing malloc and other failures.

+ 1 - 1
ccan/grab_file/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * grab_file - file helper routines

+ 1 - 0
ccan/hash/_info

@@ -1,3 +1,4 @@
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 

+ 2 - 1
ccan/heap/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * heap - a simple heap implementation

+ 1 - 0
ccan/htable/_info

@@ -1,3 +1,4 @@
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 

+ 1 - 1
ccan/idtree/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * idtree - id allocation tree

+ 1 - 1
ccan/ilog/_info

@@ -35,9 +35,9 @@
  * License: CC0 (Public domain)
  * Author: Timothy B. Terriberry <tterribe@xiph.org>
  */
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
-#include "config.h"
 
 int main(int _argc,const char *_argv[]){
   /*Expect exactly one argument.*/

+ 1 - 1
ccan/io/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * io - simple library for asynchronous io handling.

+ 1 - 1
ccan/isaac/_info

@@ -104,9 +104,9 @@
  *	// We actually depend on the LGPL ilog routines, so not PD :(
  *	license_depends_compat FAIL
  */
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
-#include "config.h"
 
 int main(int _argc,const char *_argv[]){
   /*Expect exactly one argument.*/

+ 1 - 0
ccan/iscsi/_info

@@ -1,3 +1,4 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 

+ 2 - 1
ccan/jacobson_karels/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * jacobson_karels - Jacobson/Karels Round Trip Time algorithm

+ 1 - 1
ccan/jmap/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * jmap - map from indices to values (based on libJudy)

+ 1 - 1
ccan/jset/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * jset - set of pointers (based on libJudy)

+ 2 - 1
ccan/json/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * json - Parse and generate JSON (JavaScript Object Notation)

+ 1 - 0
ccan/lbalance/_info

@@ -1,5 +1,6 @@
 /* Licensed under GPLv3+ - see LICENSE file for details */
 #include "config.h"
+#include <stdio.h>
 #include <string.h>
 
 /**

+ 1 - 1
ccan/likely/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
-#include "config.h"
 
 /**
  * likely - macros for annotating likely/unlikely branches in the code

+ 1 - 1
ccan/list/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * list - double linked list routines

+ 1 - 1
ccan/md4/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * md4 - MD4 Message Digest Algorithm (RFC1320).

+ 2 - 1
ccan/minmax/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * minmax - typesafe minimum and maximum functions

+ 2 - 1
ccan/net/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * net - simple IPv4/IPv6 socket library

+ 1 - 0
ccan/nfs/_info

@@ -1,3 +1,4 @@
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
 

+ 1 - 1
ccan/noerr/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * noerr - routines for cleaning up without blatting errno

+ 2 - 1
ccan/objset/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * objset - unordered set of pointers.

+ 1 - 1
ccan/ogg_to_pcm/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * ogg_to_pcm - decode ogg vorbis audio files to PCM data using libvorbis 

+ 1 - 1
ccan/opt/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * opt - simple command line parsing

+ 2 - 1
ccan/ptr_valid/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * ptr_valid - test whether a pointer is safe to dereference.

+ 1 - 0
ccan/rbtree/_info

@@ -1,3 +1,4 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 

+ 2 - 1
ccan/rbuf/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * rbuf - buffered I/O input primitive.

+ 1 - 1
ccan/read_write_all/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * read_write_all - read_all and write_all routines.

+ 1 - 1
ccan/short_types/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * short_types - shorter names for standard integer types

+ 1 - 1
ccan/siphash/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * siphash - a keyed hash function

+ 1 - 1
ccan/sparse_bsearch/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <string.h>
 #include <stdio.h>
-#include "config.h"
 
 /**
  * sparse_bsearch - search a sorted array with some invalid entries

+ 1 - 1
ccan/str/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * str - string helper routines

+ 1 - 1
ccan/stringmap/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * stringmap - Macros for mapping strings to things

+ 2 - 1
ccan/strmap/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * strmap - an ordered map of strings to values

+ 2 - 1
ccan/strset/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * strset - an ordered set of strings

+ 2 - 1
ccan/take/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * take - routines to mark pointers to be consumed by called functions.

+ 1 - 1
ccan/tal/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * tal - compact tree allocator routines (inspired by talloc)

+ 1 - 1
ccan/tal/grab_file/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * tal/grab_file - file helper routines

+ 1 - 1
ccan/tal/link/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * tal/link - link helper for tal

+ 2 - 1
ccan/tal/path/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * tal/path - routines to manipulate paths

+ 1 - 1
ccan/tal/str/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * tal/str - string helper routines which use tal

+ 1 - 1
ccan/tal/talloc/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * tal/talloc - an implementation of the tal interface in terms of talloc.

+ 1 - 1
ccan/talloc/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * talloc - tree allocator routines

+ 1 - 1
ccan/tally/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * tally - running tally of integers

+ 1 - 1
ccan/tap/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * tap - Test Anything Protocol

+ 1 - 0
ccan/tcon/_info

@@ -1,4 +1,5 @@
 #include "config.h"
+#include <stdio.h>
 #include <string.h>
 
 /**

+ 2 - 1
ccan/time/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * time - routines for dealing with time

+ 2 - 1
ccan/timer/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * timer - efficient implementation of rarely-expiring timers.

+ 1 - 1
ccan/tlist/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * tlist - typesafe double linked list routines

+ 2 - 1
ccan/ttxml/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * ttxml - tiny XML library for parsing (trusted!) XML documents.

+ 1 - 1
ccan/typesafe_cb/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * typesafe_cb - macros for safe callbacks.

+ 2 - 1
ccan/version/_info

@@ -1,5 +1,6 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
  * version - helper functions for major.minor-style version numbers

+ 1 - 1
ccan/wwviaudio/_info

@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * wwviaudio - realtime playback and mixing of 16 bit signed PCM audio data.

+ 2 - 1
tools/ccanlint/tests/info_exists.c

@@ -31,8 +31,9 @@ static void check_has_info(struct manifest *m,
 }
 
 static const char template[] =
-	"#include <string.h>\n"
 	"#include \"config.h\"\n"
+	"#include <stdio.h>\n"
+	"#include <string.h>\n"
 	"\n"
 	"/**\n"
 	" * %s - YOUR-ONE-LINE-DESCRIPTION-HERE\n"