Earlier quoted context omitted.
Longjmp in standard C, swapcontext in POSIX C. I think GCC allows gotos to the containing function from a local function (but I never used GCC local functions). Smalltalk, and I believe ruby, allow non local return from blocks.
longjmp simply restores the machine registers (including PC and SP) and thus doesn’t respect any sort of unwind-protect, a concept unknown in C. unwind-protect is a more general form of the c++ raii (in fact c++ got raii from Common Lisp).
I think that MSVC++ longjmp actually does proper unwinding, calling destructors in C++ functions on the stack, but don't quote me on that. I think it is also dependent on the compiler flags.