[DGD] #define peculiarity?

Michael McKiel crashnbrn71 at yahoo.ca
Sat Feb 28 17:02:57 CET 2004


I was wondering why something like:

# define KERNEL_DIR    "/k"
# define SYSTEM_DIR    "/system/"
/* AND */
# define USERD         KERNEL_DIR+SYSTEM_DIR+"userd"

is legal for a sscanf:
    sscanf(somepath, KERNEL_DIR+SYSTEM_DIR+"%*s")

but causes this (on telnet login attempts, after typing in a name):
------------------------------------------------------------------
Feb 28 10:55:33 ** Bad argument 1 for kfun call_other
  46 receive_message   /k/object/telnet (#23)
 193 receive_message   /k/inherit/connection (/k/object/telnet#23)
  66 login             /k/object/user (#24)
  61 login             /k/inherit/user (/k/object/user#24)
------------------------------------------------------------------

Shouldn't the #define have gotten resolved into:
USERD being -> "/k/system/userd"   ??



______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list