mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-31 10:30:33 +03:00 
			
		
		
		
	Introduce minimal C99 usage to verify compiler support.
This just converts a few for loops in postgres.c to declare variables in the loop initializer, and uses designated initializers in smgr.c's definition of smgr callbacks. Author: Andres Freund Discussion: https://postgr.es/m/97d4b165-192d-3605-749c-f614a0c4e783@2ndquadrant.com
This commit is contained in:
		| @@ -67,9 +67,24 @@ typedef struct f_smgr | ||||
|  | ||||
| static const f_smgr smgrsw[] = { | ||||
| 	/* magnetic disk */ | ||||
| 	{mdinit, NULL, mdclose, mdcreate, mdexists, mdunlink, mdextend, | ||||
| 		mdprefetch, mdread, mdwrite, mdwriteback, mdnblocks, mdtruncate, | ||||
| 		mdimmedsync, mdpreckpt, mdsync, mdpostckpt | ||||
| 	{ | ||||
| 		.smgr_init = mdinit, | ||||
| 		.smgr_shutdown = NULL, | ||||
| 		.smgr_close = mdclose, | ||||
| 		.smgr_create = mdcreate, | ||||
| 		.smgr_exists = mdexists, | ||||
| 		.smgr_unlink = mdunlink, | ||||
| 		.smgr_extend = mdextend, | ||||
| 		.smgr_prefetch = mdprefetch, | ||||
| 		.smgr_read = mdread, | ||||
| 		.smgr_write = mdwrite, | ||||
| 		.smgr_writeback = mdwriteback, | ||||
| 		.smgr_nblocks = mdnblocks, | ||||
| 		.smgr_truncate = mdtruncate, | ||||
| 		.smgr_immedsync = mdimmedsync, | ||||
| 		.smgr_pre_ckpt = mdpreckpt, | ||||
| 		.smgr_sync = mdsync, | ||||
| 		.smgr_post_ckpt = mdpostckpt | ||||
| 	} | ||||
| }; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user