Depends on the Mazda.
For a few years the B2300 did use the same 2.3 as our cars, but in the mid-to-late 90s the Ranger/B2300 got a new 2.3L design to use.
If you look at the 1993 Ranger 2.3 VS. the 1993 Mustang 2.3, the Mustang has 5 more hp (105) and 2 more ft/lbs of torque (135) (data from autotrader.com), that year the Mazda B2200 pickups still used the 2.2L 4-cylinder, completely different creature, not quite as durable (but close) and significantly less powerful (85hp) while just about as fuel efficient. In 1994 the Ranger and the now B2300 (due to it's new 2.3L engine, which is actually the Ford 2.3) are closer in HP (100 in the Ranger, 98 in the Mazda) and the Ranger is at 130 ft/lbs of torque (Mazda torque spec not listed at Autotrader.com) 1994 was the first year that Mazda pickups became Ranger clones, they have been since. In 1995 the HP and Torque numbers for their 2.3s are identical at 112hp and 135 lb/ft. The trusty old "Pinto Pusher" as b chandler so elegantly put it

kept on until 1997 when it put out 135hp and 135 ft/lbs of torque, in 1998 it was replaced by the new 2.5L engine (which took hp back down to 117, but bumped torque up to 149 lb/ft, which in itself was replaced with the 2.3L DOHC just a few short years later (which pretty much only has it's displacement in common with our 2.3s).
__________________
1976 Ford Mustang II Ghia: 302 with a 600cfm Edelbrock carb, Edelbrock Performer 289 intake, Dynomax Blackjack headers, 2.5" exhaust with Flowmaster Super 44s. RJS 11-gallon fuel cell, C4
tranny, chrome 16" pony wheels, fuzzy dice, brown vinyl half-top, and painted in the tackiest color ever (harvest gold, that's why I call it "The Goldenrod").
Also have a 2003 Dodge Ram (lightly modded daily driver/tow rig/office/dining room/home away from home/workshop... I call it "The Big Blue Dawg".)