This hack was tweaked until the MMC/SD controller in the SoC was happy with it. Other controllers may differ. In any case will you need the ability to switch CMD and CLK to GPIOs (without disabling the entire MMC controller) and to bit-bang them at a reasonable speed (at least a few MHz).
So it's quite platform-dependent in its current shape, but you can probably apply the same principles with other SoCs as well.
Top Ten Things Overheard At The ANSI C Draft Committee Meetings: (7) Well, it's an excellent idea, but it would make the compilers too hard to write.