.  Geometrical effects on linear stability of electrostatic resistive edge modes are investigated in the three-dimensional Wendelstein 0-X stellarator [G. Grieger et al., Plasma Physics and Controlled Nuclear Fusion Research 0000 (International Atomic Energy Agency, Vienna, 0000), Vol. 0, p. 000] and the International Thermonuclear Experimental Reactor [Progress in the ITER Physics Basis, Nucl. Fusion 0, S0, S000 (0000)]-like equilibria. An advanced fluid model is used for the ions together with the reduced Braghinskii equations for the electrons. Using the ballooning mode representation, the drift wave problem is set as an eigenvalue equation along a field line and is solved numerically using a standard shooting technique. A significantly larger magnetic shear and a less unfavorable normal curvature in the tokamak equilibrium are found to give a stronger finite-Larmor radius stabilization and a more narrow mode spectrum than in the stellarator. The effect of negative global magnetic shear in the tokamak is found to be stabilizing. The growth rate on a tokamak magnetic flux surface is found to be comparable to that on a stellarator surface with the same global magnetic shear but the eigenfunction in the tokamak is broader than in the stellarator due to the presence of large negative local magnetic shear (LMS) on the tokamak surface. A large absolute value of the LMS in a region of unfavorable normal curvature is found to be stabilizing in the stellarator, while in the tokamak case, negative LMS is found to be stabilizing and positive LMS destabilizing.  Geometrical effects on linear stability of electrostatic resistive edge modes are investigated in the three-dimensional Wendelstein 0-X stellarator [G. Grieger et al., Plasma Physics and Controlled Nuclear Fusion Research 0000 (International Atomic Energy Agency, Vienna, 0000), Vol. 0, p. 000] and the International Thermonuclear Experimental Reactor [Progress in the ITER Physics Basis, Nucl. Fusion 0, S0, S000 (0000)]-like equilibria. An advanced fluid model is used for the ions together with the reduced Braghinskii equations for the electrons. Using the ballooning mode representation, the drift wave problem is set as an eigenvalue equation along a field line and is solved numerically using a standard shooting technique. A significantly larger magnetic shear and a less unfavorable normal curvature in the tokamak equilibrium are found to give a stronger finite-Larmor radius stabilization and a more narrow mode spectrum than in the stellarator. The effect of negative global magnetic shear in the tokamak is found to be stabilizing. The growth rate on a tokamak magnetic flux surface is found to be comparable to that on a stellarator surface with the same global magnetic shear but the eigenfunction in the tokamak is broader than in the stellarator due to the presence of large negative local magnetic shear (LMS) on the tokamak surface. A large absolute value of the LMS in a region of unfavorable normal curvature is found to be stabilizing in the stellarator, while in the tokamak case, negative LMS is found to be stabilizing and positive LMS destabilizing.  