]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/dlist.h
Fix problem of accents with new Win32 code.
[bacula/bacula] / bacula / src / lib / dlist.h
index ec5b631c31c212262989a91ec72d513c2d05abc3..32933ad608518254b7205dc94949e0dc3736be86 100644 (file)
@@ -6,7 +6,7 @@
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
-   version 2 as ammended with additional clauses defined in the
+   version 2 as amended with additional clauses defined in the
    file LICENSE in the main source directory.
 
    This program is distributed in the hope that it will be useful,
    file LICENSE in the main source directory.
 
    This program is distributed in the hope that it will be useful,
  *
  * Loop var through each member of list
  */
  *
  * Loop var through each member of list
  */
+#ifdef HAVE_GCC
 #define foreach_dlist(var, list) \
 #define foreach_dlist(var, list) \
-    for((var)=NULL; (*((void **)&(var))=(void*)((list)->next(var))); )
-
-#ifdef the_old_way
+        for((var)=NULL; ((var)=(typeof(var))(list)->next(var)); )
+#else
 #define foreach_dlist(var, list) \
 #define foreach_dlist(var, list) \
-        for((var)=NULL; (((void *)(var))=(list)->next(var)); )
+    for((var)=NULL; (*((void **)&(var))=(void*)((list)->next(var))); )
 #endif
 
 
 #endif
 
 
+
 struct dlink {
    void *next;
    void *prev;
 struct dlink {
    void *next;
    void *prev;