]> mj.ucw.cz Git - libucw.git/commitdiff
Added DEFAULT_CONFIG define which tells us the name of the master
authorMartin Mares <mj@ucw.cz>
Sun, 14 Jan 2001 18:45:20 +0000 (18:45 +0000)
committerMartin Mares <mj@ucw.cz>
Sun, 14 Jan 2001 18:45:20 +0000 (18:45 +0000)
configuration file.

Added CONSTRUCTOR which is a macro generating __attribute__((constructor))
to make a function called automatically upon program startup. This is ideal
for registering of configuration sections.

lib/config.h

index 7b3fab4bc1490ab3d3450b6c1be14f3f14007a35..e5b355280a16c9a3c98f2f0d76944fa05ef40a90 100644 (file)
 #undef  SHERLOCK_CONFIG_LFS            /* Large files on 32-bit systems */
 #undef  SHERLOCK_CONFIG_LFS_LIBC       /* LFS supported directly by libc */
 
+/* Paths */
+
+#define DEFAULT_CONFIG "cf/sherlock"
+
 /* Types */
 
 typedef unsigned char byte;            /* exactly 8 bits, unsigned */
@@ -67,13 +71,10 @@ typedef s32 sh_foff_t;
 #undef inline
 #define NONRET __attribute__((noreturn))
 #define UNUSED __attribute__((unused))
+#define CONSTRUCTOR __attribute__((constructor))
 
 #else
-
-#define inline
-#define NONRET
-#define UNUSED
-
+#error This program requires the GNU C compiler.
 #endif
 
 #endif